-
Notifications
You must be signed in to change notification settings - Fork 6
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
[STY] use isort #191
[STY] use isort #191
Conversation
for more information, see https://pre-commit.ci
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.
PR Type: Refactoring
PR Summary: This pull request focuses on enhancing the codebase's consistency and style by transitioning from reorder-python-imports
to isort
for managing import orders, specifically aligning with the Black code formatting profile. The change aims to streamline the import ordering process in line with the Black formatter's style, potentially reducing conflicts and ensuring a uniform code style across the project.
Decision: Comment
📝 Type: 'Refactoring' - not supported yet.
- Sourcery currently only approves 'Typo fix' PRs.
✅ Issue addressed: this change correctly addresses the issue or implements the desired feature.
No details provided.
✅ Small diff: the diff is small enough to approve with confidence.
No details provided.
General suggestions:
- Review the full range of configuration options provided by
isort
to ensure the tool is optimally configured for the project's specific needs. While the Black profile is a solid starting point, additional customization may be necessary to perfectly align with the project's coding standards. - Consider the broader impact of this change on the project's codebase, especially if there are existing PRs or branches. Coordination may be required to minimize merge conflicts related to import order changes.
- Ensure that all contributors are aware of this change, possibly updating the project's contribution guidelines or README to include instructions or recommendations for setting up
isort
with the Black profile in their development environments.
Thanks for using Sourcery. We offer it for free for open source projects and would be very grateful if you could help us grow. If you like it, would you consider sharing Sourcery on your favourite social media? ✨
hooks: | ||
- id: reorder-python-imports | ||
args: [--py37-plus, --add-import, from __future__ import annotations] | ||
- id: isort |
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.
suggestion (llm): Ensure that the isort
configuration aligns with the project's import style preferences beyond just the Black profile. While the Black profile provides a good base, isort
offers extensive configuration options that might be beneficial for the project's specific needs.
- id: reorder-python-imports | ||
args: [--py37-plus, --add-import, from __future__ import annotations] | ||
- id: isort | ||
args: [--profile, black] |
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.
suggestion (llm): Consider specifying additional isort
arguments if there are project-specific import sorting rules that the Black profile does not cover. This can help maintain a consistent code style across the project.
No description provided.