From 352ad72250cba898482e5d1e008e26b310a59e8a Mon Sep 17 00:00:00 2001 From: Jan-Eric Nitschke <47750513+JanEricNitschke@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:04:18 +0200 Subject: [PATCH] Updated linters and checking 3.12 compatibility --- .github/workflows/build.yml | 4 ++-- .pre-commit-config.yaml | 4 ++-- pyproject.toml | 4 ++++ tests/requirements.txt | 2 +- tests/test_nav.py | 4 ++-- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd5ee5108..1b6b16ca0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,7 +15,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - python-version: ["3.11"] #, "3.12-dev"] + python-version: ["3.11", "3.12-dev"] go-version: ["1.18", "1.19", "1.20"] steps: - name: Checkout awpy library @@ -65,7 +65,7 @@ jobs: - name: Lint with ruff uses: chartboost/ruff-action@v1 with: - version: 0.0.291 + version: 0.0.292 - name: Typecheck with pyright uses: jakebailey/pyright-action@v1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index aa3f07016..1f161eddd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -26,7 +26,7 @@ repos: - id: check-builtin-literals language: python - repo: 'https://github.com/charliermarsh/ruff-pre-commit' - rev: v0.0.291 + rev: v0.0.292 hooks: - id: ruff args: @@ -38,7 +38,7 @@ repos: - id: black language: python - repo: https://github.com/crate-ci/typos - rev: v1.16.13 + rev: v1.16.17 hooks: - id: typos args: [] diff --git a/pyproject.toml b/pyproject.toml index 9f14118c4..37fd1f78b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -223,6 +223,10 @@ max-statements = 50 # Minimum number of public methods for a class (see R0903). min-public-methods = 1 +# Maximum number of allowed ancestors (see R0901). +# Inheriting from typing_extensions.TypedDict alones gives that +max-parents = 22 + [tool.pylint.exceptions] # Exceptions that will emit a warning when caught. overgeneral-exceptions = ["builtins.BaseException"] diff --git a/tests/requirements.txt b/tests/requirements.txt index 21c433cb4..5bc470a84 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,5 +1,5 @@ pre-commit==3.4.0 -pylint==2.17.6 +pylint==3.0.0 pyright==1.1.329 pytest==7.4.2 pytest-cov==4.1.0 diff --git a/tests/test_nav.py b/tests/test_nav.py index 7a11ab124..24c5d2401 100644 --- a/tests/test_nav.py +++ b/tests/test_nav.py @@ -721,7 +721,7 @@ def test_position_token(self): assert token["ctToken"] == "000000000000000000000000000000" assert ( token["token"] - == "000000000000000000000000000000000000000000000000100000000000" # noqa: S105,E501 + == "000000000000000000000000000000000000000000000000100000000000" # noqa: S105 ) frame = { "ct": { @@ -754,7 +754,7 @@ def test_position_token(self): assert token["ctToken"] == "000000000000000000100000000000" assert ( token["token"] - == "000000000000000000100000000000000000000000000000000000000000" # noqa: S105,E501 + == "000000000000000000100000000000000000000000000000000000000000" # noqa: S105 ) with pytest.raises(ValueError, match="Map not found."):