-
Notifications
You must be signed in to change notification settings - Fork 117
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
Pre commit checks #517
Pre commit checks #517
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -9,34 +9,46 @@ ci: | |||||
|
||||||
repos: | ||||||
- repo: https://github.com/asottile/pyupgrade | ||||||
rev: v3.15.0 | ||||||
rev: v2.31.0 | ||||||
hooks: | ||||||
- id: pyupgrade | ||||||
args: ["--py37-plus"] | ||||||
args: ["--py39-plus"] | ||||||
|
||||||
- repo: https://github.com/adamchainz/django-upgrade | ||||||
rev: '1.15.0' | ||||||
rev: '1.4.0' | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Keep an eye out for these, and if the version is lower on one repo, update it so that we are using the later versions everywhere. So what I'm seeing here makes it look like the pre-commit file in django-cms may need it's version upgrading.
Suggested change
|
||||||
hooks: | ||||||
- id: django-upgrade | ||||||
args: [--target-version, "2.2"] | ||||||
|
||||||
- repo: https://github.com/PyCQA/flake8 | ||||||
rev: 6.1.0 | ||||||
hooks: | ||||||
- id: flake8 | ||||||
args: [--target-version, "3.2"] | ||||||
|
||||||
- repo: https://github.com/asottile/yesqa | ||||||
rev: v1.5.0 | ||||||
rev: v1.3.0 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
hooks: | ||||||
- id: yesqa | ||||||
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||||||
rev: v4.5.0 | ||||||
rev: v4.1.0 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm making these modify and upgrading also codespell and ruff-pre-commit |
||||||
hooks: | ||||||
- id: check-merge-conflict | ||||||
- id: debug-statements | ||||||
- id: mixed-line-ending | ||||||
- id: trailing-whitespace | ||||||
|
||||||
- repo: https://github.com/codespell-project/codespell | ||||||
rev: v2.1.0 | ||||||
hooks: | ||||||
- id: codespell | ||||||
|
||||||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||||||
rev: v0.1.14 | ||||||
hooks: | ||||||
- id: ruff | ||||||
args: [--fix, --exit-non-zero-on-fix] | ||||||
- id: ruff-format | ||||||
|
||||||
- repo: https://github.com/pycqa/isort | ||||||
rev: 5.13.2 | ||||||
- repo: https://github.com/rstcheck/rstcheck | ||||||
rev: v6.2.0 | ||||||
hooks: | ||||||
- id: isort | ||||||
- id: rstcheck | ||||||
additional_dependencies: | ||||||
- sphinx==6.1.3 | ||||||
- tomli==2.0.1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[tool.ruff] | ||
select=[ | ||
"E", # pycodestyle errors | ||
"W", # pycodestyle warnings | ||
"F", # pyflakes | ||
"I", # isort | ||
"C", # flake8-comprehensions | ||
"B", # flake8-bugbear | ||
"PLE", # pylint error | ||
"PLR", # pylint refactor | ||
"PLW", # pylint warning | ||
"UP", # pyupgrade | ||
] | ||
|
||
extend-ignore = [ | ||
# TODO fix separately | ||
"E501", # line too long | ||
"I001", # import block unsorted | ||
"C408", # unnecessary dict call | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok this highlights the need to upgrade the version in the repo where you've taken this code from as it's old.