Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pre-commit hooks #93

Merged
merged 1 commit into from
Jan 13, 2025
Merged
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
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
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
Loading