-
Notifications
You must be signed in to change notification settings - Fork 161
Fix: use __all__ to avoid noqa in import #70
Conversation
is there some documentation about this being the convention in python? |
Hi Yuri, |
What happens if I make a typo when defining the Are there unit tests that verify that all symbols can be correctly imported via |
Hey, Using
I'm wondering if having the |
@yurishkuro Here is an example:
I prefer using isort to automatically manage explicit imports, but this is zero harm in this specific change. It will be fully backwards compatible with anything that imports directly. My only nit with this PR is that |
Is it better to use "# noinspection PyUnresolvedReferences" ? |
@zgfh that is only valid for developers using pycharm. I use vim (as an example) with some syntastic + flake8 on buffer save. |
I honestly think keeping the current way is just fine - on one hand, it let us be explicit and simple on what we expose, and we can also let the compiler report errors right away. Moreover, from the docs:
For Finally, this doesn't really fix the |
+1 Personally I would consider |
Wondering if we should discard this PR, considering the feedback. |
closes #54
Used
__all__
to avoid noqa in import