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

Created __all__ for llms.py #42

Merged
merged 1 commit into from
Jan 23, 2025
Merged

Created __all__ for llms.py #42

merged 1 commit into from
Jan 23, 2025

Conversation

jamesbraza
Copy link
Contributor

I wanted to make sure of something

@jamesbraza jamesbraza added the enhancement New feature or request label Jan 23, 2025
@jamesbraza jamesbraza requested a review from a team January 23, 2025 19:18
@jamesbraza jamesbraza self-assigned this Jan 23, 2025
Copy link
Collaborator

@maykcaldas maykcaldas left a comment

Choose a reason for hiding this comment

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

lgtm. But shouldn't it give a ruff warning saying that we have imports not at the top of the file?

@jamesbraza
Copy link
Contributor Author

jamesbraza commented Jan 23, 2025

lgtm. But shouldn't it give a ruff warning saying that we have imports not at the top of the file?

Good question. From PEP 8: https://peps.python.org/pep-0008/#module-level-dunder-names

Module level “dunders” (i.e. names with two leading and two trailing underscores) such as __all__, __author__, __version__, etc. should be placed after the module docstring but before any import statements except from __future__ imports.

So __all__ goes at the top before imports 👌

@jamesbraza jamesbraza merged commit bac1b5f into main Jan 23, 2025
7 checks passed
@jamesbraza jamesbraza deleted the llms-all branch January 23, 2025 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants