simonsobs / SOLikeT

SO Likelihoods and Theories
https://soliket.readthedocs.io/
MIT License
12 stars 15 forks source link

Modernization #189

Open cmbant opened 3 months ago

cmbant commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 "_"?)