@@ -152,17 +152,11 @@ def read_algo_metadata(spec: const.AlgoSpec) -> PQAMetaData:
152152 return PQAMetaData (** data )
153153
154154
155- def check_opsys_support (spf : PQASupportedPlatform , variant : const .PQAVariant ) -> str | None :
156- os_name = ''
155+ def check_opsys_support (spf : PQASupportedPlatform ) -> str | None :
157156 for opsys in spf .operating_systems :
158- _os_name = opsys .lower ()
159- if platform .system ().lower () == _os_name :
160- os_name = _os_name
161- if os_name :
162- for x , y in const .ExcludedCombinations :
163- if x == os_name and y == variant : # pragma: no cover
164- return None
165- return os_name or None
157+ if platform .system ().lower () == opsys .lower ():
158+ return opsys .lower ()
159+ return None
166160
167161
168162def check_arch_support (impl : PQAImplementation ) -> PQASupportedPlatform | None :
@@ -189,11 +183,14 @@ def check_platform_support(
189183 spf = check_arch_support (impl )
190184 if not spf :
191185 return None , None
192- elif spf .operating_systems :
193- opsys = check_opsys_support (spf , variant )
186+ if spf .operating_systems :
187+ opsys = check_opsys_support (spf )
194188 if not opsys :
195189 return None , None
196- elif spf .required_flags : # pragma: no branch
190+ for x , y in const .ExcludedCombinations :
191+ if x == opsys and y == variant : # pragma: no cover
192+ return None , None
193+ if spf .required_flags : # pragma: no branch
197194 required_flags = spf .required_flags
198195
199196 pqclean_dir = find_pqclean_dir (src_must_exist = True )
0 commit comments