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

Sort imports with isort #5931

Closed
4 tasks
mjspeck opened this issue Sep 29, 2023 · 2 comments · Fixed by #5933 or #7264
Closed
4 tasks

Sort imports with isort #5931

mjspeck opened this issue Sep 29, 2023 · 2 comments · Fixed by #5933 or #7264
Assignees
Labels
topic:CI topic:DX Developer Experience type:refactor Not necessarily visible to the users

Comments

@mjspeck
Copy link
Contributor

mjspeck commented Sep 29, 2023

Is your feature request related to a problem? Please describe.
Imports are unstandardized, adding friction to outside developers contributing.

Describe the solution you'd like
Add in support for isort including a pre-commit hook, and configuration in pyproject.toml. This will not only sort imports, but ensure that all future imports are sorted according to the same specification.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Tasks

@mjspeck mjspeck changed the title Sort imports with isort ci: sort imports with isort Sep 29, 2023
@mjspeck mjspeck changed the title ci: sort imports with isort Sort imports with isort Sep 29, 2023
mjspeck added a commit to mjspeck/haystack that referenced this issue Sep 29, 2023
@silvanocerza
Copy link
Contributor

We reverted PR #5933 with #5980 as isort and black were conflicting.
Reopening.

@silvanocerza silvanocerza reopened this Oct 5, 2023
mjspeck added a commit to mjspeck/haystack that referenced this issue Oct 7, 2023
mjspeck added a commit to mjspeck/haystack that referenced this issue Oct 18, 2023
@shadeMe shadeMe added type:refactor Not necessarily visible to the users topic:CI topic:DX Developer Experience P2 Medium priority, add to the next sprint if no P1 available labels Jan 4, 2024
@masci masci removed the P2 Medium priority, add to the next sprint if no P1 available label Feb 9, 2024
@wochinge
Copy link
Contributor

Btw, there black / isort compatibility here: https://pycqa.github.io/isort/docs/configuration/black_compatibility.html

Anyway, I enabled checking for the right sorting using ruff here: #7207

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:CI topic:DX Developer Experience type:refactor Not necessarily visible to the users
Projects
None yet
5 participants