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

Switch to Ruff for linting #38

Merged
merged 2 commits into from
Oct 12, 2024
Merged

Switch to Ruff for linting #38

merged 2 commits into from
Oct 12, 2024

Conversation

Bilbottom
Copy link
Owner

@Bilbottom Bilbottom commented Oct 12, 2024

Summary by Sourcery

Switch to Ruff for linting and formatting Python code, replacing existing tools in the pre-commit configuration. Refactor integration test assertions for better readability.

Enhancements:

  • Switch to using Ruff for linting and formatting Python code, replacing multiple tools like pyupgrade, black, isort, and pycln.

CI:

  • Update pre-commit configuration to use Ruff for linting and formatting, simplifying the setup by consolidating multiple tools into one.

Tests:

  • Refactor test assertions in integration tests for improved readability and maintainability.

Copy link

sourcery-ai bot commented Oct 12, 2024

Reviewer's Guide by Sourcery

This pull request switches the project's linting and formatting tools to Ruff, a fast Python linter and formatter. It updates the pre-commit configuration, removes several individual tools, and makes minor adjustments to the test files.

Class diagram for MockRunnerResult changes

classDiagram
    class MockRunnerResult {
        +bool success
        +BaseException|None exception
    }
    class MockRunner {
        +invoke(args)
    }
    MockRunnerResult <|-- MockRunner : uses
Loading

File-Level Changes

Change Details Files
Replace multiple Python linting and formatting tools with Ruff
  • Remove pyupgrade, black, isort, and pycln hooks
  • Add Ruff for linting with '--fix' argument
  • Add Ruff for formatting
  • Update pytest command to run quietly
.pre-commit-config.yaml
Minor code formatting changes in test file
  • Wrap long lines to improve readability
  • Remove 'noqa' comment from a method definition
tests/integration/test__integration.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @Bilbottom - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Review instructions: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@Bilbottom Bilbottom merged commit c9700e0 into main Oct 12, 2024
4 checks passed
@Bilbottom Bilbottom deleted the switch-to-ruff branch October 12, 2024 08:02
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.

1 participant