8000 mypy: Fix all union-attr by Avasam · Pull Request #366 · pypa/distutils · GitHub
[go: up one dir, main page]

Skip to content

mypy: Fix all union-attr #366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and c 8000 ontact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

Avasam
Copy link
Contributor
@Avasam Avasam commented May 4, 2025

No description provided.

@@ -360,7 +360,7 @@ def build_modules(self) -> None:
self.build_module(module, module_file, package)

def build_packages(self) -> None:
for package in self.packages:
for package in self.packages or ():
Copy link
Contributor Author
@Avasam Avasam May 4, 2025

Choose a reason for hiding this comment

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

This is a change in behaviour as it would graciously do nothing instead of raising if self.packages is still None.

If it makes more sense to raise, a clearer error than TypeError: 'NoneType' object is not iterable can be raised instead.

@Avasam Avasam changed the title Re-organize mypy errors mypy: Fix all union-attr May 4, 2025
Comment on lines +235 to +237
_wordchars_re = re.compile(rf'[^\\\'\"{string.whitespace} ]*')
_squote_re = re.compile(r"'(?:[^'\\]|\\.)*'")
_dquote_re = re.compile(r'"(?:[^"\\]|\\.)*"')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This isn't exactly "heavy computing" is it? Did it need to be done lazily ?

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
0