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

ci: Added ruff format rules #7800

Merged
merged 4 commits into from
Feb 2, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ repos:
- id: codespell

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
rev: v0.1.15
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,9 @@ combine-as-imports = true
[tool.ruff.pyupgrade]
# Preserve types, even if a file imports `from __future__ import annotations`.
keep-runtime-typing = true

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
docstring-code-line-length = 80
36 changes: 0 additions & 36 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -66,42 +66,6 @@ bcrypt = bcrypt
[bdist_wheel]
universal=1

[flake8]
exclude =
.env,
.venv,
docs,
migrations,
node_modules,
cms/admin/__init__.py,
cms/models/__init__.py,
cms/sitemaps/__init__.py,
cms/test_utils/project/brokenpluginapp/cms_plugins.py,
cms/utils/__init__.py
cms/utils/compat/forms.py
ignore=
E701,
# multiple statements on one line
E722,
# do not use bare 'except'
E731,
# do not assign a lambda expression, use a def
W503,
# line break before binary operator
W605
# invalid escape sequence
max-line-length = 119

[isort]
line_length = 79
combine_as_imports = true
default_section = THIRDPARTY
include_trailing_comma = true
known_first_party = cms, menus
multi_line_output = 5
skip = migrations
skip_glob = cms/admin/__init__.py,cms/models/__init__.py

[codespell]
ignore-words-list = cant,statics,groupe,manuel,uptodate
skip = package-lock.json,*.js,*.js.html,*.po,./node_modules/*,./.idea/*,./docs/env/*,./docs/build/*,./.env/*,./.venv/*,./build/*,./django_cms.egg-info/*,./.git,./cms/test_utils/project/sampleapp/models.py,./venv/*,./docs/spelling_wordlist
Expand Down