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

Modernization #189

Open
cmbant opened this issue Aug 7, 2024 · 2 comments
Open

Modernization #189

cmbant opened this issue Aug 7, 2024 · 2 comments

Comments

@cmbant
Copy link
Collaborator

cmbant commented Aug 7, 2024

People shouldn't normally be using import *, can we delete all the all lists, or are they needed for something?

We could perhaps also consider using min python 3.10 (or 3.11 for speed/error reporting), then people could use the modern cleaner type hinting syntax rather than changing it later - any reason why not?

@ggalloni
Copy link
Collaborator

As regards __all__ lists, they were introduced to avoid switching off F401 (imported but unused error from flake8) at each line on every __init__.py. I agree that wildcard imports shouldn't be used, but, in my opinion, those lists are a nice way to avoid F401 and state which parts of each module are publicly available explicitly.

@cmbant
Copy link
Collaborator Author

cmbant commented Aug 20, 2024

Interesting, pycharm reports errors for unused imports a bit more intelligently - in all files except init. I guess this could be reproduced with flake8 using
per-file-ignores =
*/init.py: F401

(everything imported is public if it doesn't start with "_"?)

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

No branches or pull requests

2 participants