Skip to content

Commit

Permalink
Update hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Dec 19, 2024
1 parent 581f42a commit 162c31e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exclude: ".yarn/|yarn.lock|\\.min\\.(css|js)$"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-builtin-literals
Expand All @@ -14,12 +14,12 @@ repos:
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.17.0
rev: 1.22.2
hooks:
- id: django-upgrade
args: [--target-version, "3.2"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.4.4"
rev: "v0.8.3"
hooks:
- id: ruff
- id: ruff-format
Expand All @@ -32,10 +32,10 @@ repos:
args: [--no-semi]
exclude: "^conf/|.*\\.html$"
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 2.1.1
rev: v2.5.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.17
rev: v0.23
hooks:
- id: validate-pyproject
2 changes: 1 addition & 1 deletion html_sanitizer/sanitizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def is_mergeable(e1, e2):
"""
return True

def sanitize(self, html):
def sanitize(self, html): # noqa: C901 -- I know.
"""
Clean HTML code from ugly copy-pasted CSS and empty elements
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
"Topic :: Software Development",
]
Expand Down Expand Up @@ -95,6 +96,8 @@ extend-ignore = [
"B905",
# No line length errors
"E501",
# Let me use percent formatting, it's not broken
"UP031",
]
mccabe.max-complexity = 15
per-file-ignores."*/migrat*/*" = [
Expand Down

0 comments on commit 162c31e

Please sign in to comment.