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

chore: update ruff pre-commit and rules #522

Merged
merged 4 commits into from
Mar 7, 2024
Merged

Conversation

d0choa
Copy link
Collaborator

@d0choa d0choa commented Mar 6, 2024

✨ Context

Updates ruff pre-commit from 0.2.2 to 0.3.0.

After update, the next warnings and file changes were triggered

warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`:
  - 'ignore' -> 'lint.ignore'
  - 'select' -> 'lint.select'
  - 'flake8-quotes' -> 'lint.flake8-quotes'
  - 'pydocstyle' -> 'lint.pydocstyle'
  - 'per-file-ignores' -> 'lint.per-file-ignores'
warning: `PGH001` has been remapped to `S307`.
warning: `TRY200` has been remapped to `B904`.
warning: The following rules may cause conflicts when used with the formatter: `ISC001`. To avoid unexpected behavior, we recommend disabling these rules, either by removing them from the `select` or `extend-select` configuration, or adding them to the `ignore` configuration.
33 files reformatted, 20 files left unchanged

🛠 What does this PR implement

pre-commit.yaml update and the necessary changes in the codebase associated with the new formatting and rule changes.

This PR addresses the above comments.

🚦 Before submitting

  • Do these changes cover one single feature (one change at a time)?
  • Did you read the contributor guideline?
  • Did you make sure to update the documentation with your changes?
  • Did you make sure there is no commented out code in this PR?
  • Did you follow conventional commits standards in PR title and commit messages?
  • Did you make sure the branch is up-to-date with the dev branch?
  • Did you write any new necessary tests?
  • Did you make sure the changes pass local tests (make test)?
  • Did you make sure the changes pass pre-commit rules (e.g poetry run pre-commit run --all-files)?

@github-actions github-actions bot added documentation Improvements or additions to documentation size-S Chore labels Mar 6, 2024
@d0choa
Copy link
Collaborator Author

d0choa commented Mar 6, 2024

This was causing issues in #521

@d0choa
Copy link
Collaborator Author

d0choa commented Mar 6, 2024

@ireneisdoomed I added a minor refactor to one of your tests to remove a #type: ignore causing issues

@d0choa
Copy link
Collaborator Author

d0choa commented Mar 6, 2024

relates to #515

Copy link
Contributor

@DSuveges DSuveges left a comment

Choose a reason for hiding this comment

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

All pre-commit checks run successfully.

@DSuveges DSuveges merged commit bc28795 into dev Mar 7, 2024
4 checks passed
@DSuveges DSuveges deleted the do_precommit_update branch March 7, 2024 09:58
DSuveges added a commit that referenced this pull request Mar 8, 2024
* chore: update ruff pre-commit and rules

* refactor: to address None type and remove typeignore

---------

Co-authored-by: Daniel Suveges <daniel.suveges@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Chore documentation Improvements or additions to documentation size-S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants