diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b31fd33..a4aed73 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,4 +1,4 @@ -name: "LINT: Run ruff & mypy" +name: "LINT: Run ruff & pyright" on: push: pull_request: @@ -17,7 +17,7 @@ jobs: run: | python -m pip install --upgrade poetry poetry install - - name: Lint with ruff & mypy + - name: Lint with ruff & pyright run: | poetry run ruff check async_signals tests - poetry run mypy async_signals + poetry run pyright async_signals diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index edd9515..5058cd6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: end-of-file-fixer - id: check-added-large-files @@ -8,16 +8,16 @@ repos: - id: check-docstring-first - id: debug-statements - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.0.291 + rev: v0.2.1 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - repo: https://github.com/Lucas-C/pre-commit-hooks-safety - rev: v1.3.2 + rev: v1.3.3 hooks: - id: python-safety-dependencies-check - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook - rev: v9.5.0 + rev: v9.11.0 hooks: - id: commitlint stages: [commit-msg] diff --git a/justfile b/justfile index 219777b..358b594 100644 --- a/justfile +++ b/justfile @@ -32,8 +32,8 @@ test-all: (poetry "run" "tox") ruff *args: (poetry "run" "ruff" "check" "async_signals" "tests" args) -mypy *args: (poetry "run" "mypy" "async_signals" args) +pyright *args: (poetry "run" "pyright" "async_signals" args) -lint: ruff mypy +lint: ruff pyright publish: (poetry "publish" "--build") diff --git a/pyproject.toml b/pyproject.toml index 32e6baf..588bcae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,19 +15,21 @@ python = "^3.8" pytest = ">=7.1.3,<9.0.0" pytest-cov = ">=3,<5" pytest-mock = "^3.8.2" -mypy = ">=0.971,<2.0" anyio = {extras = ["trio"], version = ">=3.6.1,<5.0.0"} tox = ">=3.26,<5.0" -ruff = ">=0.0.284,<0.3.0" +ruff = ">=0.2.0,<0.3.0" +pyright = ">=1.1.350,<1.2" [tool.ruff] -select = ["F","E","W","C","I","N","UP","ANN","S","B","A","COM","C4","T20","PT","ARG","TD","RUF"] line-length = 115 target-version = "py38" -ignore = ["A001","A002","A003","ANN101","ANN102","ANN401","C901","N8","B008","F405","F821"] output-format = "grouped" -[tool.ruff.per-file-ignores] +[tool.ruff.lint] +select = ["F","E","W","C","I","N","UP","ANN","S","B","A","COM","C4","T20","PT","ARG","TD","RUF"] +ignore = ["A001","A002","A003","ANN101","ANN102","ANN401","C901","N8","B008","F405","F821"] + +[tool.ruff.lint.per-file-ignores] "__init__.py" = ["F401"] "conftest.py" = ["S101","ANN","F401"] "test_*.py" = ["S101","ANN","F401","ARG001"]