Skip to content

Commit

Permalink
🐛Cover unset config setting corner case @ pkgng
Browse files Browse the repository at this point in the history
It was previously addressed for MyPy incorrectly.
  • Loading branch information
webknjaz committed Nov 19, 2023
1 parent 5659e3c commit 0fa265b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packaging/pep517_backend/_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ def _make_pure_python(config_settings: dict[str, str] | None = None) -> bool:
(os.environ, PURE_PYTHON_ENV_VAR, KeyError),
)
for src_mapping, src_key, lookup_errors in user_provided_setting_sources:
assert src_mapping is not None
with suppress(lookup_errors): # type: ignore[arg-type]
return src_mapping[src_key].lower() in truthy_values
candidate_val = src_mapping[src_key].lower() # type: ignore[index]
return candidate_val in truthy_values

return PURE_PYTHON_MODE_CLI_FALLBACK

Expand Down

0 comments on commit 0fa265b

Please sign in to comment.