-
Notifications
You must be signed in to change notification settings - Fork 14
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
Organize imports #105
Labels
Milestone
Comments
For future reference, @kiudee referenced https://pypi.org/project/zimports/ in slack. |
7 tasks
timokau
added a commit
to timokau/cs-ranking
that referenced
this issue
Apr 1, 2020
As suggested by pep8: https://www.python.org/dev/peps/pep-0008/#public-and-internal-interfaces Not doing so trips up flake8's F401, since the imports are not used. Imports are an implementation detail and should not directly be relied upon to declare the public API. Two exceptions to this are csrank/__init__.py and csrank/dataset_reader/__init__.py, where the API is too big. This will likely change in the future. See kiudee#105.
timokau
added a commit
to timokau/cs-ranking
that referenced
this issue
Apr 1, 2020
As suggested by pep8: https://www.python.org/dev/peps/pep-0008/#public-and-internal-interfaces Not doing so trips up flake8's F401, since the imports are not used. Imports are an implementation detail and should not directly be relied upon to declare the public API. Two exceptions to this are csrank/__init__.py and csrank/dataset_reader/__init__.py, where the API is too big. This will likely change in the future. See kiudee#105.
timokau
added a commit
to timokau/cs-ranking
that referenced
this issue
Apr 1, 2020
As suggested by pep8: https://www.python.org/dev/peps/pep-0008/#public-and-internal-interfaces Not doing so trips up flake8's F401, since the imports are not used. Imports are an implementation detail and should not directly be relied upon to declare the public API. Two exceptions to this are csrank/__init__.py and csrank/dataset_reader/__init__.py, where the API is too big. This will likely change in the future. See kiudee#105.
After we have tackled this, we should revisit flake8's star-import related warnings F403 and F405. |
This was referenced Apr 13, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently we import all submodules in
__init__
:cs-ranking/csrank/__init__.py
Lines 3 to 9 in 55396fb
This results in the user seeing a confusing list of submodules. We should trim that by using
__all__
to only import important classes and functions.The remaining modules are still available, but hidden by default.
The text was updated successfully, but these errors were encountered: