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

project: Format and sort imports #765

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

pdgendt
Copy link
Collaborator

@pdgendt pdgendt commented Nov 4, 2024

Apply isort --profile black on files in src/ and tests/

Apply isort on files in src/

Signed-off-by: Pieter De Gendt <[email protected]>
Apply isort on files in tests/

Signed-off-by: Pieter De Gendt <[email protected]>
Check for isort issues when running ruff check.

Signed-off-by: Pieter De Gendt <[email protected]>
@pdgendt pdgendt requested a review from marc-hb November 4, 2024 18:57
@pdgendt pdgendt marked this pull request as ready for review November 4, 2024 20:04
Copy link
Collaborator

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed on Discord, I'm generally not a fan of these mass reformats because they break git cherry-pick/rebase/merge/revert/blame/... and they tend to do so repeatedly when the formatting tools gets upgraded or the west/ruff.config file gets "optimized". Moreover, this does not seem to add a lot of value.

HOWEVER this one looks small and harmful enough; a git conflict in imports should never be hard to fix.

SelfUpdate,
Status,
Topdir,
Update,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 per line is a significant waste of screen estate but no big deal...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Splitting these long lines to help out a lot for git diffs though.

@pdgendt pdgendt merged commit 815fefb into zephyrproject-rtos:main Nov 5, 2024
16 checks passed
@pdgendt pdgendt deleted the tox-ruff-isort branch November 5, 2024 07:18
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.

2 participants