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

PEP8 fixes #665

Merged
merged 5 commits into from
Mar 28, 2023
Merged

PEP8 fixes #665

merged 5 commits into from
Mar 28, 2023

Conversation

cclauss
Copy link
Contributor

@cclauss cclauss commented Mar 25, 2023

Describe the tool ruff, how it finds three pep8 issues, and how it fixes those 3 issues.

Ruff supports over 500 lint rules and can be used to replace Flake8 (plus dozens of plugins), isort, pydocstyle, yesqa, eradicate, pyupgrade, and autoflake, all while executing (in Rust) tens or hundreds of times faster than any individual tool.

% ruff --select=E703,E712,E713 --statistics .

 12	E703	[*] Statement ends with an unnecessary semicolon
105	E712	[*] Comparison to `False` should be `cond is False`
 13	E713	[*] Test for membership should be `not in`

% ruff --select=E703,E712,E713 --fix .

Found 130 errors (130 fixed, 0 remaining).

Copy link
Collaborator

@skirpichev skirpichev left a comment

Choose a reason for hiding this comment

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

Seems ok, but please ensure, that these errors are tested in CI. Could you also make commit message more descriptive?

@cclauss cclauss force-pushed the pep8-fixes branch 2 times, most recently from 25fc810 to 439b769 Compare March 26, 2023 10:05
@cclauss cclauss requested a review from skirpichev March 26, 2023 10:10
pyproject.toml Outdated Show resolved Hide resolved
@cclauss cclauss requested a review from skirpichev March 26, 2023 12:03
@skirpichev skirpichev removed their assignment Mar 26, 2023
Copy link
Collaborator

@skirpichev skirpichev left a comment

Choose a reason for hiding this comment

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

Few unrelated changes, but LGTM.
Let's wait few days if someone will object against changes. Code style changes always debatable.

@skirpichev skirpichev self-requested a review March 26, 2023 13:35
setup.cfg Outdated Show resolved Hide resolved
setup.cfg Outdated Show resolved Hide resolved
@skirpichev skirpichev merged commit 6489ed3 into mpmath:master Mar 28, 2023
@cclauss cclauss deleted the pep8-fixes branch March 28, 2023 08:08
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.

None yet

3 participants