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

Define __all__ #625

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

AdrienVannson
Copy link
Contributor

Summary

Define __all__ in the generated files, as suggested by #486

Checklist

  • If code changes were made then they have been tested.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).

@Gobot1234
Copy link
Collaborator

Please move this to the end of the file, because honestly it's not something I want to see

@Gobot1234
Copy link
Collaborator

Also please can you change this to a tuple not a list

@AdrienVannson
Copy link
Contributor Author

It is defined at the top of the file on purpose, as suggested by PEP-8: https://peps.python.org/pep-0008/#module-level-dunder-names

@Gobot1234
Copy link
Collaborator

Please can you add a test that this exists and avoids importing dataclasses etc?

@Gobot1234
Copy link
Collaborator

It is defined at the top of the file on purpose, as suggested by PEP-8: peps.python.org/pep-0008#module-level-dunder-names

I have never seen it go before module imports hmm.

cetanu
cetanu previously approved these changes Oct 16, 2024
Copy link
Collaborator

@cetanu cetanu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the python docs say it should go before imports, then okay.

@AdrienVannson
Copy link
Contributor Author

Please can you add a test that this exists and avoids importing dataclasses etc?

I added a test that check that __all__ is correctly defined. However, I'm not sure what you mean by importing dataclasses

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants