Skip to content

Commit 2be30fe

Browse files
committed
Pre-commit configuration fixes
1 parent d50616c commit 2be30fe

12 files changed

Lines changed: 33 additions & 21 deletions

File tree

.pre-commit-config.yaml

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,40 @@
1-
exclude: ".yarn/|yarn.lock|\\.min\\.(css|js)$"
1+
exclude: "django_prose_editor/static/"
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
44
rev: v6.0.0
55
hooks:
66
- id: check-added-large-files
7+
- id: check-builtin-literals
8+
- id: check-executables-have-shebangs
79
- id: check-merge-conflict
10+
- id: check-toml
11+
- id: check-yaml
12+
- id: detect-private-key
813
- id: end-of-file-fixer
14+
- id: mixed-line-ending
915
- id: trailing-whitespace
10-
- repo: https://github.com/asottile/pyupgrade
11-
rev: v3.21.2
12-
hooks:
13-
- id: pyupgrade
14-
args: [--py310-plus]
1516
- repo: https://github.com/adamchainz/django-upgrade
1617
rev: 1.30.0
1718
hooks:
1819
- id: django-upgrade
1920
args: [--target-version, "4.2"]
20-
- repo: https://github.com/pycqa/isort
21-
rev: 9.0.0a3
21+
- repo: https://github.com/astral-sh/ruff-pre-commit
22+
rev: v0.15.13
23+
hooks:
24+
- id: ruff-check
25+
args: [--unsafe-fixes]
26+
- id: ruff-format
27+
- repo: https://github.com/biomejs/pre-commit
28+
rev: v2.4.15
2229
hooks:
23-
- id: isort
24-
args: [--profile=black, --lines-after-imports=2, --combine-as]
25-
- repo: https://github.com/psf/black-pre-commit-mirror
26-
rev: 26.5.0
30+
- id: biome-check
31+
args: [--unsafe]
32+
verbose: true
33+
- repo: https://github.com/tox-dev/pyproject-fmt
34+
rev: v2.21.2
2735
hooks:
28-
- id: black
29-
- repo: https://github.com/pycqa/flake8
30-
rev: 7.3.0
36+
- id: pyproject-fmt
37+
- repo: https://github.com/abravalheri/validate-pyproject
38+
rev: v0.25
3139
hooks:
32-
- id: flake8
33-
args: ["--ignore=E203,E501,W503"]
40+
- id: validate-pyproject

feincms_oembed/contents.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class FeedContent(models.Model):
7979
url = models.URLField(
8080
_("Feed URL"),
8181
help_text=_(
82-
"Insert any RSS URL," " e.g. https://www.djangoproject.com/rss/weblog/"
82+
"Insert any RSS URL, e.g. https://www.djangoproject.com/rss/weblog/"
8383
),
8484
)
8585

feincms_oembed/migrations/0001_initial.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33

44
class Migration(migrations.Migration):
5-
65
dependencies = []
76

87
operations = [

feincms_oembed/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from django.utils import timezone
1010
from django.utils.translation import gettext_lazy as _
1111

12+
1213
DEFAULT_MAX_AGE = 7 * 24 * 60 * 60 # Cache lookups for a week
1314

1415

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env python3
22
from setuptools import setup
33

4+
45
setup()

tests/manage.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
import sys
44

5+
56
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
67

78
if __name__ == "__main__":

tests/testapp/migrate/page/0001_initial.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88

99
class Migration(migrations.Migration):
10-
1110
initial = True
1211

1312
dependencies = []

tests/testapp/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from feincms_oembed.contents import OembedContent
44

5+
56
Page.register_templates(
67
{
78
"key": "base",

tests/testapp/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import os
22

3+
34
INSTALLED_APPS = (
45
"django.contrib.auth",
56
"django.contrib.contenttypes",

tests/testapp/test_admin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from feincms_oembed.models import CachedLookup
66

7+
78
ASTLEY = "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
89

910

0 commit comments

Comments
 (0)