Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact 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

A005 does not fire for packages #124

Closed
kasium opened this issue Apr 4, 2024 · 3 comments · Fixed by #125
Closed

A005 does not fire for packages #124

kasium opened this issue Apr 4, 2024 · 3 comments · Fixed by #125

Comments

@kasium
Copy link

kasium commented Apr 4, 2024

Not sure if this intended, but A005 does not fire for packages (folders) shadowing stdlib modules. So, socket/__init__.py will not lead to an flake8 error

@asfaltboy
Copy link
Contributor

Nice find @kasium, it's an oversight on my end as I didn't test this scenario when submitting the original PR for the rule (see #121).

It seems flake8's iterator interface currently only runs for modules (.py files) and does not run for directories. But, I think we can look for __init__.py modules, that have a parent dir called the same as a built-in. I'll open a quick PR

@kasium
Copy link
Author

kasium commented Apr 8, 2024

Thanks a lot!

@gforcada
Copy link
Owner

gforcada commented Apr 9, 2024

@asfaltboy @kasium flake8-builtins==2.5.0 is out 🎩 🐰 ✨

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 a pull request may close this issue.

3 participants