10000 ci: Added ruff format rules (#7800) · django-cms/django-cms@9e56597 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9e56597

Browse files
authored
ci: Added ruff format rules (#7800)
* chore: Added ruff format config * chore: Set shorter docstring line length * chore: Update ruff * chore: Remove old config
1 parent 4fbd4dc commit 9e56597

File tree

3 files changed

+7
-37
lines changed

3 files changed

+7
-37
lines changed

.pre-commit-config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ repos:
3939
- id: codespell
4040

4141
- repo: https://github.com/astral-sh/ruff-pre-commit
42-
rev: v0.1.14
42+
rev: v0.1.15
4343
hooks:
4444
- id: ruff
4545
args: [--fix, --exit-non-zero-on-fix]

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,9 @@ combine-as-imports = true
7575
[tool.ruff.pyupgrade]
7676
# Preserve types, even if a file imports `from __future__ import annotations`.
7777
keep-runtime-typing = true
78+
79+
[tool.ruff.format]
80+
quote-style = "double"
81+
indent-style = "space"
82+
docstring-code-format = true
83+
docstring-code-line-length = 80

setup.cfg

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -66,42 +66,6 @@ bcrypt = bcrypt
6666
[bdist_wheel]
6767
universal=1
6868

69-
[flake8]
70-
exclude =
71-
.env,
72-
.venv,
73-
docs,
74-
migrations,
75-
node_modules,
76-
cms/admin/__init__.py,
77-
cms/models/__init__.py,
78-
cms/sitemaps/__init__.py,
79-
cms/test_utils/project/brokenpluginapp/cms_plugins.py,
80-
cms/utils/__init__.py
81-
cms/utils/compat/forms.py
82-
ignore=
83-
E701,
84-
# multiple statements on one line
85-
E722,
86-
# do not use bare 'except'
87-
E731,
88-
# do not assign a lambda expression, use a def
89-
W503,
90-
# line break before binary operator
91-
W605
92-
# invalid escape sequence
93-
max-line-length = 119
94-
95-
[isort]
96-
line_length = 79
97-
combine_as_imports = true
98-
default_section = THIRDPARTY
99-
include_trailing_comma = true
100-
known_first_party = cms, menus
101-
multi_line_output = 5
102-
skip = migrations
103-
skip_glob = cms/admin/__init__.py,cms/models/__init__.py
104-
10569
[codespell]
10670
ignore-words-list = cant,statics,groupe,manuel,uptodate
10771
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

0 commit comments

Comments
 (0)
0