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

Pre commit checks #517

Merged
merged 4 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 22 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,13 @@ repos:
rev: v3.15.0
hooks:
- id: pyupgrade
args: ["--py37-plus"]
args: ["--py39-plus"]

- repo: https://github.com/adamchainz/django-upgrade
rev: '1.15.0'
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
Expand All @@ -34,9 +29,26 @@ repos:
rev: v4.5.0
hooks:
- id: check-merge-conflict
- id: debug-statements
- id: mixed-line-ending
- id: trailing-whitespace

- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.15
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
20 changes: 20 additions & 0 deletions pyproject.toml
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
]
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,7 @@ sections = FUTURE, STDLIB, DJANGO, CMS, THIRDPARTY, FIRSTPARTY, LOCALFOLDER
known_first_party = djangocms_admin_style
known_cms = cms, menus
known_django = django

[codespell]
ignore-words-list = cant,statics,groupe,manuel,uptodate
skip = package-lock.json,*.js,*.js.html,*.po,./.idea/*,./.env/*,./.venv/*,./django_cms.egg-info/*,./.git,*.scss
Loading