-
Notifications
You must be signed in to change notification settings - Fork 6
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
clean up the exported names #324
Comments
Serious question: is it actually possible to satisfy mypy? In my experience, every warning or two that I silence seems to open up other cans of worms. |
Scanning the Apart from attrs classes, we're mostly using stock Python types (float, int, str) and simple containers (list, dict, tuple), so annotations for function params and return values shouldn't be too onerous. Of course, typing support is not as good in Python 3.6 as in Python 3.9, so there will be some constraints (e.g. having to say |
Closes popsim-consortium#324. Note that non-public symbols are still accessible, and that some applications, such as iPython, will ignore __all__ when offering tab-completion suggestions.
Closes popsim-consortium#324. Note that non-public symbols are still accessible when referred to explicitly by name. But here we use the module-level __dir__() function to define which symbols are seen when using dir(<module-name>). This is a Python >= 3.7 only feature, but the function is just ignored on Python 3.6.
Closes popsim-consortium#324. Note that non-public symbols are still accessible when referred to explicitly by name. But here we use the module-level __dir__() function to define which symbols are seen when using dir(<module-name>). This is a Python >= 3.7 only feature, but the function is just ignored on Python 3.6.
Closes popsim-consortium#324. Note that non-public symbols are still accessible when referred to explicitly by name. But here we use the module-level __dir__() function to define which symbols are seen when using dir(<module-name>). This is a Python >= 3.7 only feature, but the function is just ignored on Python 3.6.
Closes popsim-consortium#324. Note that non-public symbols are still accessible when referred to explicitly by name. But here we use the module-level __dir__() function to define which symbols are seen when using dir(<module-name>). This is a Python >= 3.7 only feature, but the function is just ignored on Python 3.6.
Closes popsim-consortium#324. Note that non-public symbols are still accessible when referred to explicitly by name. But here we use the module-level __dir__() function to define which symbols are seen when using dir(<module-name>). This is a Python >= 3.7 only feature, but the function is just ignored on Python 3.6.
Closes popsim-consortium#324. Note that non-public symbols are still accessible when referred to explicitly by name. But here we use the module-level __dir__() function to define which symbols are seen when using dir(<module-name>). This is a Python >= 3.7 only feature, but the function is just ignored on Python 3.6.
We should use
__all__
to only export names that are part of the public API. Also see mypy --strict output in #323, where theModule has no attribute "foo"
suggests where we might consider explicit exports.The text was updated successfully, but these errors were encountered: