Skip to content

Commit

Permalink
Update pre-commit hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSuperiorStanislav committed Jan 13, 2025
1 parent 1293446 commit dc50c4b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 17 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: debug-statements
- id: check-merge-conflict
- id: detect-private-key
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.2
rev: v0.9.1
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/google/yamlfmt
rev: v0.13.0
rev: v0.15.0
hooks:
- id: yamlfmt
- repo: https://github.com/asottile/add-trailing-comma
rev: v2.4.0
rev: v3.1.0
hooks:
- id: add-trailing-comma
- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.1
hooks:
- id: gitlint
- repo: https://github.com/rtts/djhtml
rev: v1.5.2
rev: 3.0.7
hooks:
- id: djhtml
args: ["--tabwidth=2"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ This script show/hide error detail info by clicking appropriate link:
(function($) {
$(document).ready(function() {
const showRowData = $('.show-error-detail'),
dataStateAttr = 'state',
openedState = 'opened',
closedState = 'closed';
dataStateAttr = 'state',
openedState = 'opened',
closedState = 'closed';

showRowData.click(function(e) {
const self = $(this);
Expand Down
6 changes: 2 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -208,12 +208,10 @@ extend-select = [
"RUF",
]
ignore = [
# https://docs.astral.sh/ruff/rules/builtin-module-shadowing
"A005",
# https://docs.astral.sh/ruff/rules/missing-type-args
"ANN002",
# https://docs.astral.sh/ruff/rules/missing-type-self
"ANN101",
# https://docs.astral.sh/ruff/rules/missing-type-cls
"ANN102",
# https://docs.astral.sh/ruff/rules/missing-type-kwargs
"ANN003",
# https://docs.astral.sh/ruff/rules/any-type
Expand Down
4 changes: 2 additions & 2 deletions test_project/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ def pytest_configure() -> None:


@pytest.fixture(scope="session", autouse=True)
def django_db_setup(django_db_setup): # noqa: PT004
def django_db_setup(django_db_setup):
"""Set up test db for testing."""


@pytest.fixture(autouse=True)
def enable_db_access_for_all_tests(django_db_setup, db): # noqa: PT004
def enable_db_access_for_all_tests(django_db_setup, db):
"""Allow all tests to access DB."""


Expand Down
6 changes: 3 additions & 3 deletions test_project/tests/integration_tests/test_api/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ def test_export_api_ordering(
assert (
export_job := ExportJob.objects.filter(id=response.data["id"]).first()
)
assert (
export_job.resource_kwargs["ordering"] == ordering_value
), export_job.resource_kwargs["ordering"]
assert export_job.resource_kwargs["ordering"] == ordering_value, (
export_job.resource_kwargs["ordering"]
)


@pytest.mark.django_db(transaction=True)
Expand Down

0 comments on commit dc50c4b

Please sign in to comment.