From ea732b1e91682a710b360c01b2f6b7aebc38b95d Mon Sep 17 00:00:00 2001 From: Obdulia Losantos Date: Tue, 11 Feb 2025 10:01:09 +0100 Subject: [PATCH] Bump requirements and `pre-commit` hooks. (#181) --- .gitignore | 1 + .pre-commit-config.yaml | 10 +++++----- extra_settings/__init__.py | 1 - pyproject.toml | 7 ++++--- requirements-test.txt | 4 ++-- tests/test_templatetags.py | 2 +- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index c208c2f..699a90f 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ __pycache__/ ## Local setup .vscode/ .venv/ +venv/ # Distribution / packaging .Python diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b13a377..6ad1553 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,19 +3,19 @@ repos: - repo: /~https://github.com/asottile/pyupgrade - rev: v3.18.0 + rev: v3.19.1 hooks: - id: pyupgrade - args: ["--py38-plus"] + args: ["--py310-plus"] - repo: /~https://github.com/adamchainz/django-upgrade - rev: 1.22.1 + rev: 1.23.1 hooks: - id: django-upgrade - args: ["--target-version", "3.0"] + args: ["--target-version", "4.0"] - repo: /~https://github.com/astral-sh/ruff-pre-commit - rev: v0.6.9 + rev: v0.9.6 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] diff --git a/extra_settings/__init__.py b/extra_settings/__init__.py index 8bcabb4..ecaa83d 100644 --- a/extra_settings/__init__.py +++ b/extra_settings/__init__.py @@ -14,7 +14,6 @@ except ImproperlyConfigured: pass -default_app_config = "extra_settings.apps.ExtraSettingsConfig" __all__ = [ "__author__", diff --git a/pyproject.toml b/pyproject.toml index fac7fd4..b21d9b4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,6 @@ content-type = "text/markdown" [project.license] file = "LICENSE.txt" -content-type = "text/plain" [project.urls] Homepage = "/~https://github.com/fabiocaccamo/django-extra-settings" @@ -83,11 +82,13 @@ exclude = ''' ''' [tool.ruff] -ignore = [] line-length = 88 + +[tool.ruff.lint] +ignore = [] select = ["B", "B9", "C", "E", "F", "W"] -[tool.ruff.mccabe] +[tool.ruff.lint.mccabe] max-complexity = 10 [tool.setuptools.packages.find] diff --git a/requirements-test.txt b/requirements-test.txt index abc65c2..0445e6e 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,4 @@ coverage == 7.6.* -pre-commit == 4.0.* +pre-commit == 4.1.* psycopg2-binary == 2.9.* -tox == 4.22.* +tox == 4.24.* diff --git a/tests/test_templatetags.py b/tests/test_templatetags.py index bec6766..a823e55 100644 --- a/tests/test_templatetags.py +++ b/tests/test_templatetags.py @@ -23,7 +23,7 @@ def _render_template(self, string, context=None): def test_get_setting(self): rendered = self._render_template( - "{% load extra_settings %}" '{% get_setting "PACKAGE_NAME" %}' + '{% load extra_settings %}{% get_setting "PACKAGE_NAME" %}' ) self.assertEqual(rendered, "django-extra-settings")