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

Move template linting and formatting to ruff #5613

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ea6ff79
Move template linting and formatting to ruff
browniebroke Dec 31, 2024
122070c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Dec 31, 2024
7542965
Remove comments as they're wrongly placed
browniebroke Dec 31, 2024
f1b173a
Tweak multi-line comment
browniebroke Dec 31, 2024
23af0dc
Remove a couple of commented out Ruff rules
browniebroke Dec 31, 2024
97a74b9
Fix extend-exclude in Ruff config
browniebroke Dec 31, 2024
33a1cd7
Adjust Ruff line length
browniebroke Dec 31, 2024
3ccfc21
Run Ruff pre-commit hook
browniebroke Dec 31, 2024
9297598
Run Ruff with --unsafe-fixes
browniebroke Dec 31, 2024
7d1e843
Run Ruff with --add-noqa
browniebroke Dec 31, 2024
448fb81
Run Ruff formatter
browniebroke Dec 31, 2024
304acae
Drop Python 2 in pre/post generation hooks
browniebroke Dec 31, 2024
972a072
Restore print statements in pre/post-generation hooks
browniebroke Dec 31, 2024
e5acc9f
Restore print statements in scripts
browniebroke Dec 31, 2024
2a6be9e
Indent toml with 2 spaces
browniebroke Dec 31, 2024
2747e02
Exclude docs and revert most changes from Ruff
browniebroke Dec 31, 2024
1e9bed3
Merge branch 'master' into lint-format-template-with-ruff
browniebroke Jan 9, 2025
5489c66
Merge branch 'master' into lint-format-template-with-ruff
browniebroke Jan 11, 2025
9275c8f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jan 11, 2025
ea15146
Fix Ruff issue
browniebroke Jan 11, 2025
b02f9b4
Merge branch 'master' into lint-format-template-with-ruff
browniebroke Jan 16, 2025
b72e5b2
Disable PLR0133 in pre/post commit hooks
browniebroke Jan 17, 2025
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
4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

25 changes: 5 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,12 @@ repos:
- id: prettier
args: ["--tab-width", "2"]

- repo: https://github.com/asottile/pyupgrade
rev: v3.19.1
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: pyupgrade
args: [--py312-plus]
exclude: hooks/

- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black

- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 7.1.1
hooks:
- id: flake8
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format

- repo: https://github.com/tox-dev/pyproject-fmt
rev: "v2.5.0"
Expand Down
6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
"cookiecutter-django Documentation",
"cookiecutter-django",
"manual",
)
),
]

# The name of an image file (relative to this directory) to place at the top of
Expand Down Expand Up @@ -223,7 +223,7 @@
"Cookiecutter Django documentation",
["Daniel Roy Greenfeld"],
1,
)
),
]

# If true, show URL addresses after external links.
Expand All @@ -242,7 +242,7 @@
"Cookiecutter Django documentation",
"Daniel Roy Greenfeld",
"Cookiecutter Django",
"A Cookiecutter template for creating production-ready " "Django projects quickly.",
"A Cookiecutter template for creating production-ready Django projects quickly.",
"Miscellaneous",
)
]
Expand Down
Empty file added hooks/__init__.py
Empty file.
Loading
Loading