Skip to content

Conversation

@Avasam
Copy link
Contributor

@Avasam Avasam commented May 4, 2025

This would "fix itself" with #335

@Avasam Avasam mentioned this pull request May 4, 2025
@Avasam Avasam force-pushed the mypy--Fix-all-func-returns-value branch from 641daab to 99d3a10 Compare May 4, 2025 16:03
Comment on lines +60 to +64
if not dry_run:
try:
name.mkdir(mode=mode, parents=True, exist_ok=True)
except OSError as exc:
raise DistutilsFileError(f"could not create '{name}': {exc.args[-1]}")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/pypa/distutils/pull/343/files#r2440539508

This one could be ignored on the line itself without being unsafe.

It's an unused expression, both mypy and pyright warn here because of the lack of assignement, it "looks like" a possible mistake because the result of the expression is not used for anything. But it's just a conditional execution pattern.

It's definitely more of a lint than a type error.

FWIW, #334 / #335 would remove the condition anyway.

@Avasam Avasam force-pushed the mypy--Fix-all-func-returns-value branch from 99d3a10 to d70e53a Compare November 2, 2025 16:24
@Avasam Avasam force-pushed the mypy--Fix-all-func-returns-value branch from d70e53a to fafa5d1 Compare November 2, 2025 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant