diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b92da1b1495..ed036900439 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -50,13 +50,10 @@ repos: - repo: local hooks: - - id: mypy - name: mypy + - id: ty + name: ty language: python - additional_dependencies: - - venv-run==0.2.0 - entry: venv-run mypy - args: [--config-file=test/setup.cfg] + entry: ty check --python .venv . types: [python] # Intentionally not run on helpers-core/python (we support very old versions) exclude: ^completions-(core|fallback)/|^test/fixtures/pytest/ diff --git a/pyproject.toml b/pyproject.toml index 12d45e693db..b03048acddf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,10 @@ +[project] +name = "bash-completion" +dynamic = ["version"] +requires-python = ">= 3.7" + [tool.ruff] line-length = 79 -target-version = "py37" lint.select = ["E", "F", "B", "I"] lint.ignore = [ # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules diff --git a/test/requirements-dev.txt b/test/requirements-dev.txt index 7f0b54718af..a754f99abe4 100644 --- a/test/requirements-dev.txt +++ b/test/requirements-dev.txt @@ -2,5 +2,5 @@ -r requirements.txt -mypy==1.8.0 ruff==0.15.6 +ty==0.0.26 diff --git a/test/setup.cfg b/test/setup.cfg index a377a59a4cc..cef707ce83b 100644 --- a/test/setup.cfg +++ b/test/setup.cfg @@ -3,9 +3,3 @@ minversion = 3.6 markers = bashcomp complete - -[mypy] -python_version = 3.6 -mypy_path = $MYPY_CONFIG_FILE_DIR/t -show_error_codes = true -enable_error_code = ignore-without-code,redundant-self,truthy-iterable