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

feat(lint): switch to ruff #935

Merged
merged 20 commits into from Feb 23, 2023
Merged

feat(lint): switch to ruff #935

merged 20 commits into from Feb 23, 2023

Conversation

onerandomusername
Copy link
Member

Summary

Migrate to ruff, and stop using flake8. This speeds up a full repository lint from 25+ seconds to half a second.

If we choose to use ruff's import sorting, then we can remove isort and speed up by about another second (of ~2.5)

Checklist

  • If code changes were made, then they have been tested
    • I have updated the documentation to reflect the changes
    • I have formatted the code properly by running task lint
    • I have type-checked the code by running task pyright
  • This PR fixes an issue
  • This PR adds something new (e.g. new method or parameters)
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

@onerandomusername onerandomusername added s: needs review Issue/PR is awaiting reviews t: meta Changes to the project itself (CI, configs, etc.) t: refactor/typing/lint Refactors, typing changes and/or linting changes labels Feb 19, 2023
@onerandomusername onerandomusername added this to the disnake v2.9 milestone Feb 19, 2023
@onerandomusername onerandomusername marked this pull request as ready for review February 19, 2023 18:23
@shiftinv shiftinv removed this from the disnake v2.9 milestone Feb 19, 2023
Copy link
Member

@shiftinv shiftinv left a comment

Choose a reason for hiding this comment

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

how on earth does it run so quickly :o

.pre-commit-config.yaml Outdated Show resolved Hide resolved
disnake/ext/commands/base_core.py Outdated Show resolved Hide resolved
disnake/ext/commands/core.py Outdated Show resolved Hide resolved
disnake/ext/commands/params.py Outdated Show resolved Hide resolved
docs/extensions/attributetable.py Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
examples/basic_voice.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@onerandomusername onerandomusername changed the title chore: switch to ruff chore(lint): switch to ruff Feb 21, 2023
@onerandomusername onerandomusername changed the title chore(lint): switch to ruff feat(lint): switch to ruff Feb 21, 2023
@onerandomusername
Copy link
Member Author

onerandomusername commented Feb 22, 2023

Keep in mind if #836 is merged first, #836 (comment) and https://github.com/DisnakeDev/disnake/pull/836/files#diff-1dccad827a8e5157df1dcdb70b73e454524c2586ebc64576af82cb348d478892R37-R39 can be resolved here

Copy link
Member

@shiftinv shiftinv left a comment

Choose a reason for hiding this comment

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

lgtm!

pyproject.toml Outdated Show resolved Hide resolved
@onerandomusername onerandomusername force-pushed the tooling/switch-to-ruff branch 2 times, most recently from 8011b70 to 8bbed2c Compare February 23, 2023 16:04
@onerandomusername onerandomusername merged commit 458501a into master Feb 23, 2023
@onerandomusername onerandomusername deleted the tooling/switch-to-ruff branch February 23, 2023 20:16
@onerandomusername onerandomusername removed the s: needs review Issue/PR is awaiting reviews label Feb 23, 2023
@onerandomusername onerandomusername added this to the disnake v2.9 milestone Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: meta Changes to the project itself (CI, configs, etc.) t: refactor/typing/lint Refactors, typing changes and/or linting changes
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants