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

build: Replace flake8 with ruff #629

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

DimitriPapadopoulos
Copy link
Contributor

@DimitriPapadopoulos DimitriPapadopoulos commented Dec 31, 2023

Fixes #628.

Requires to be rebased on top of #627 to pass tests.

@coveralls
Copy link

coveralls commented Dec 31, 2023

Coverage Status

coverage: 99.822%. remained the same
when pulling 1322760 on DimitriPapadopoulos:flake8_ruff
into 1d65ab6 on adrienverge:master.

@adrienverge adrienverge mentioned this pull request Jan 4, 2024
Copy link
Owner

@adrienverge adrienverge left a comment

Choose a reason for hiding this comment

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

Thanks Dimitri, I approve this 👍

I don't understand the rule "only one blank line between imports and variables", but if ruff suggests it, I guess it's better.

pyproject.toml Outdated Show resolved Hide resolved
@DimitriPapadopoulos
Copy link
Contributor Author

DimitriPapadopoulos commented Jan 4, 2024

Perhaps I can find a ruff setting for that, ruff is more flexible than black. Let me have a look. But yes, I would recommend endorsing whatever ruff suggests and not thinking too much about it, as far as readability is not impaired.

@DimitriPapadopoulos
Copy link
Contributor Author

I had a look at the isort settings, I believe lines-after-imports = 2 will do the trick. I'll give it a try.

@DimitriPapadopoulos
Copy link
Contributor Author

DimitriPapadopoulos commented Jan 4, 2024

Can you have a look? Now ruff adds a line where there was only 1 line. Is lines-after-imports = 2 really worth it?

Copy link
Owner

@adrienverge adrienverge left a comment

Choose a reason for hiding this comment

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

Can you have a look? Now ruff adds a line where there was only 1 line. Is lines-after-imports = 2 really worth it?

Yeah I agree, it's not worth it.

tests/rules/test_quoted_strings.py Outdated Show resolved Hide resolved
Add isort (I) rules to the default set of ruff rules, as a replacement
for flake8-import-order.
Copy link
Owner

@adrienverge adrienverge left a comment

Choose a reason for hiding this comment

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

Thanks a lot @DimitriPapadopoulos!

@adrienverge adrienverge merged commit 254a218 into adrienverge:master Jan 8, 2024
7 checks passed
@DimitriPapadopoulos DimitriPapadopoulos deleted the flake8_ruff branch January 8, 2024 06:44
DimitriPapadopoulos added a commit to DimitriPapadopoulos/yamllint that referenced this pull request Feb 1, 2024
Start with reverting parts of commit 26be794 in adrienverge#629 related to config
and CI jobs.
DimitriPapadopoulos added a commit to DimitriPapadopoulos/yamllint that referenced this pull request Feb 1, 2024
Start with reverting parts of commit 26be794 in adrienverge#629 related to config
and CI jobs.
adrienverge pushed a commit that referenced this pull request Feb 2, 2024
Start with reverting parts of commit 26be794 in #629 related to config
and CI jobs.
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.

flake8 → ruff?
3 participants