apify-client-python
apify-client-python copied to clipboard
Remove `__all__` from all `__init__.py`
Utilizing star imports, such as from apify_client import *, is generally considered as a bad practice in Python. This is because it can lead to namespace conflicts. While there may be specific scenarios where star imports could be useful, I don't see the case in the context of our packages.
I suggest removing them from our codebase so that we don't incentivize users to adopt this practice. Also, we won't have to maintain these lists anymore.
Yeah, good idea. When I added those, I thought they behave a bit differently, that they limit what can be imported even through named imports (sort of like module.exports in Node.js).
Unfortunately, this is a breaking change, so let's wait with this until we have to do a major release because of something else. (We should start collecting these breaking issues into some 2.0 milestone or something, so that we don't forget about them).
Closing, as it turns out the __all__ variable is used by Pylance to recognize the public interface of the package.