-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add coding convention for internal subpackages without __init__.py files #31618
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Aug 7, 2025
This was referenced Aug 7, 2025
f37cf5e
to
693814a
Compare
This was referenced Aug 7, 2025
1e869f5
to
a8f0d09
Compare
693814a
to
9ef6e80
Compare
a8f0d09
to
a457021
Compare
9ef6e80
to
14b9e13
Compare
a457021
to
fc22533
Compare
8b593f4
to
f4ee657
Compare
bb36051
to
6f73e93
Compare
9054ada
to
db9c8a6
Compare
6f73e93
to
8884733
Compare
This was referenced Aug 7, 2025
This commit codifies a coding convention for internal subpackage organization: - Added explicit guidance in CLAUDE.md about not creating __init__.py files for internal subpackages - Updated pyproject.toml ruff configuration to ignore INP001 errors for mixins directory - Aligns with existing codebase patterns of using absolute imports without __init__.py for internal organization
OwenKephart
requested changes
Aug 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is a convention that we currently use -- we always have __init__.py
files, we just keep them empty for the most part. I think the directive should just be something along the lines of:
ALWAYS keep `__init__.py` files empty
db9c8a6
to
d2d925a
Compare
8884733
to
b03a8f7
Compare
yeah this is totally wrong actually. breaks MANIFEST.in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary & Motivation
This PR codifies a coding convention for internal subpackage organization in the Dagster codebase. It establishes that internal subpackages should not have
__init__.py
files and should use absolute imports instead.The changes include:
CLAUDE.md
stating "DO NOT create__init__.py
files for internal subpackages - use absolute imports instead since we use absolute imports throughout the codebase"pyproject.toml
ruff configuration to ignore INP001 linting errors for themixins
directory, as it's an internal subpackage that intentionally doesn't have an__init__.py
fileThis convention aligns with the existing codebase patterns and prevents unnecessary
__init__.py
files in internal organizational directories.How I Tested These Changes
Verified that ruff linting passes with the new configuration and that the coding conventions are clearly documented.