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

[STY] use isort #191

Merged
merged 2 commits into from
Feb 5, 2024
Merged

[STY] use isort #191

merged 2 commits into from
Feb 5, 2024

Conversation

Remi-Gau
Copy link
Contributor

@Remi-Gau Remi-Gau commented Feb 5, 2024

No description provided.

@Remi-Gau Remi-Gau merged commit ead8894 into cpp-lln-lab:main Feb 5, 2024
10 of 13 checks passed
@Remi-Gau Remi-Gau deleted the sty branch February 5, 2024 16:55
Copy link

@sourcery-ai sourcery-ai bot left a 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? ✨

Share Sourcery

Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

hooks:
- id: reorder-python-imports
args: [--py37-plus, --add-import, from __future__ import annotations]
- id: isort
Copy link

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]
Copy link

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.

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.

1 participant