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
Fix the import path for pulp-hashlib #4007
Conversation
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.
Wow, how could this have gone unnoticed?
Can you remove the #noqa for something more specific?
After some discussion, I am removing all |
c0abf73
to
7cebc1d
Compare
In this commit, there were also removed redundant #noqa directives that were used in the plugin API. The flake8 configuration had to be adjusted accordingly to ignore the import errors. closes pulp#4006
7cebc1d
to
7e85e61
Compare
I made a trade-off between ignored pulpcore/pulpcore/plugin/actions.py Line 17 in e152b3d
|
The #noqa were removed only from init.py files. Other files now contain the specific error.
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.
Have you considered doing the __all__ = [...]
? I think that is what is actually supposed to be done in python.
@@ -7,6 +7,8 @@ | |||
[flake8] | |||
exclude = ./docs/*,*/migrations/*,./pulpcore/app/protobuf/* | |||
|
|||
per-file-ignores = */__init__.py: F401 |
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.
You may need to make this change in the plugin-template. It has a DO NOT EDIT remark.
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.
Oh, yes. 😿
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.
The purpose of |
# This can lead to circular imports with a custom user model depending on this very module | ||
# Moved to plugin/models/role.py to avoid the circular import. | ||
# from .role import ( # noqa | ||
# GroupRole, | ||
# Role, | ||
# UserRole, | ||
# ) |
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.
Should this comment really be deleted?
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.
Yes. It is redundant. On the other hand, could we bring back the imports in the next breaking release because of cd342f3?
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.
Maybe.
Backport to 3.28: 💚 backport PR created✅ Backport PR branch: Backported as #4020 🤖 @patchback |
Backport to 3.28: 💚 backport PR created✅ Backport PR branch: Backported as #4034 🤖 @patchback |
Backport to 3.28: 💚 backport PR created✅ Backport PR branch: Backported as #4048 🤖 @patchback |
Backport to 3.29: 💚 backport PR created✅ Backport PR branch: Backported as #4049 🤖 @patchback |
In this commit, there were also removed redundant #noqa directives that
were used in the plugin API. The flake8 configuration had to be adjusted
accordingly to ignore the import errors.
closes #4006