Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
38 changes: 0 additions & 38 deletions .github/workflows/lint.yml

This file was deleted.

13 changes: 4 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,18 @@ repos:
- id: django-upgrade
args: [--target-version, "5.2"]

- repo: https://github.com/PyCQA/flake8
rev: 7.3.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.10
hooks:
- id: flake8
additional_dependencies: [Flake8-pyproject]
- id: ruff-check
args: [--fix]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-merge-conflict
- id: mixed-line-ending

- repo: https://github.com/pycqa/isort
rev: 9.0.0a3
hooks:
- id: isort

- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.25.1
hooks:
Expand Down
3 changes: 1 addition & 2 deletions djangocms_link/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
from django.db.models import JSONField, ManyToOneRel
from django.forms import Field, MultiWidget, Select, TextInput, URLInput
from django.utils.encoding import force_str
from django.utils.translation import get_language
from django.utils.translation import get_language, override
from django.utils.translation import gettext_lazy as _
from django.utils.translation import override

from cms.utils.urlutils import admin_reverse

Expand Down
3 changes: 1 addition & 2 deletions djangocms_link/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
from django.core.exceptions import ValidationError
from django.db import models
from django.utils.encoding import force_str
from django.utils.translation import gettext
from django.utils.translation import gettext, override
from django.utils.translation import gettext_lazy as _
from django.utils.translation import override

from cms.models import CMSPlugin

Expand Down
69 changes: 23 additions & 46 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 5.2",
"Framework :: Django :: 5.2",
"Framework :: Django :: 6.0",
"Framework :: Django :: 6.1",
"Framework :: Django CMS",
Expand Down Expand Up @@ -56,56 +56,33 @@ package-data.djangocms_link = [ "LICENSE", "locale/**/*", "README.rst", "static/
dynamic.version = { attr = "djangocms_link.__version__" }

[tool.ruff]
exclude = [
"djangocms_link/migrations/*",
]

[tool.isort]
line_length = 119
multi_line_output = 5
include_trailing_comma = true
lines_after_imports = 2
sections = [
"FUTURE",
"STDLIB",
"DJANGO",
"CMS",
"THIRDPARTY",
"FIRSTPARTY",
"LOCALFOLDER",
]
default_section = "THIRDPARTY"
known_first_party = "djangocms_link"
skip = [
"*migrations*",
".eggs",
line-length = 119
extend-exclude = [
"**/migrations/**",
".env",
".tox",
".venv",
"data",
"manage.py",
]
known_cms = [ "cms", "menus" ]
known_django = "django"

[tool.flake8]
max-line-length = 119
exclude = [
"*.egg-info",
".eggs",
".env",
".git",
".settings",
".tox",
".venv",
"build",
"data",
"dist",
"docs",
"*migrations*",
"requirements",
"tmp",
]
lint.select = [
"E",
"F",
"I",
"W",
]
lint.isort.known-first-party = [ "djangocms_link" ]
lint.isort.lines-after-imports = 2
lint.isort.section-order = [
"future",
"standard-library",
"django",
"cms",
"third-party",
"first-party",
"local-folder",
]
lint.isort.sections.cms = [ "cms", "menus" ]
lint.isort.sections.django = [ "django" ]

[tool.coverage]
run.branch = true
Expand Down
3 changes: 0 additions & 3 deletions tests/requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ django-filer>=1.5.0
html5lib>=1
tox
coverage
isort
flake8
flake8-pyproject
pyflakes>=2.1
django-test-migrations
pytest
Expand Down
1 change: 1 addition & 0 deletions tests/requirements/dj42_cms311.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

Django>=4.2,<5.0
django-cms>=3.11,<4.0
django-test-migrations<1.7 # 1.7 requires Django 5.2+
1 change: 1 addition & 0 deletions tests/requirements/dj42_cms41.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

Django>=4.2,<5.0
django-cms>=4.1,<4.2
django-test-migrations<1.7 # 1.7 requires Django 5.2+
1 change: 1 addition & 0 deletions tests/requirements/dj50_cms311.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

Django>=5.0,<5.1
django-cms>=3.11,<4.0
django-test-migrations<1.7 # 1.7 requires Django 5.2+
1 change: 1 addition & 0 deletions tests/requirements/dj50_cms41.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

Django>=5.0,<5.1
django-cms>=4.1,<4.2
django-test-migrations<1.7 # 1.7 requires Django 5.2+
1 change: 1 addition & 0 deletions tests/requirements/dj51_cms41.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

Django>=5.1,<5.2
django-cms>=4.1,<4.2
django-test-migrations<1.7 # 1.7 requires Django 5.2+
Loading