Skip to content
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

Remove __all__ from all __init__.py #165

Open
vdusek opened this issue Nov 20, 2023 · 1 comment
Open

Remove __all__ from all __init__.py #165

vdusek opened this issue Nov 20, 2023 · 1 comment
Labels
debt Code quality improvement or decrease of technical debt. t-tooling Issues with this label are in the ownership of the tooling team.

Comments

@vdusek
Copy link
Contributor

vdusek commented Nov 20, 2023

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.

@vdusek vdusek added debt Code quality improvement or decrease of technical debt. t-tooling Issues with this label are in the ownership of the tooling team. labels Nov 20, 2023
@vdusek vdusek self-assigned this Nov 20, 2023
@fnesveda
Copy link
Member

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).

@vdusek vdusek removed their assignment Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
debt Code quality improvement or decrease of technical debt. t-tooling Issues with this label are in the ownership of the tooling team.
Projects
None yet
Development

No branches or pull requests

2 participants