From 0cbea6ab0c1b8670d22643b853cb457e5e489eff Mon Sep 17 00:00:00 2001 From: Ilya Priven <1186084+ikonst@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:09:09 +0100 Subject: [PATCH 1/4] Add pyright to CI --- .github/workflows/test.yaml | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4de537ff..4d70b8c3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -49,18 +49,38 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 + - name: Set up Python + uses: actions/setup-python@v5 with: - python-version: 3.8 - - name: Install dependencies + python-version: 3.13 + - name: Install dev dependencies run: | - python -m pip install --upgrade pip python -m pip install -e .[signals] -r requirements-dev.txt - name: Run mypy run: | mypy . + pyright: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.13 + - name: Set up Node + uses: actions/setup-node@v4 + - name: Install PynamoDB dev dependencies + run: | + python -m pip install -e .[signals] -r requirements-dev.txt + - name: Install pyright + run: | + npm install -g pyright + - name: Run pyright + run: | + pyright . + build-docs: runs-on: ubuntu-latest From e89c6833fc8a83d6df97c33a4ad0c25e61969ba3 Mon Sep 17 00:00:00 2001 From: Ilya Priven <1186084+ikonst@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:16:17 +0100 Subject: [PATCH 2/4] bump mypy --- requirements-dev.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index f0da32c3..7687cb85 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,8 +5,8 @@ freezegun # only used in CI coveralls -mypy==1.2.0 -typing-extensions==4.5.0 +mypy==1.16.0 +typing-extensions==4.14.0 pytest-cov blinker==1.6.2 From 0c8fae6ffb0642c9204a0fb9afe02bcb76c780e2 Mon Sep 17 00:00:00 2001 From: Ilya Priven <1186084+ikonst@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:18:05 +0100 Subject: [PATCH 3/4] remove mypy from requirements-dev --- .github/workflows/test.yaml | 3 +++ requirements-dev.txt | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4d70b8c3..73276d9c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -56,6 +56,9 @@ jobs: - name: Install dev dependencies run: | python -m pip install -e .[signals] -r requirements-dev.txt + - name: Install mypy + run: | + python -m pip install mypy - name: Run mypy run: | mypy . diff --git a/requirements-dev.txt b/requirements-dev.txt index 7687cb85..96b643ba 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,8 +5,7 @@ freezegun # only used in CI coveralls -mypy==1.16.0 -typing-extensions==4.14.0 +typing-extensions>=4.5.0 pytest-cov blinker==1.6.2 From 40dad4e1d1bd78326e131bf8ad40283a2a0f0e60 Mon Sep 17 00:00:00 2001 From: Ilya Priven <1186084+ikonst@users.noreply.github.com> Date: Fri, 13 Jun 2025 17:25:11 +0100 Subject: [PATCH 4/4] add pyrightconfig --- pyrightconfig.json | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 pyrightconfig.json diff --git a/pyrightconfig.json b/pyrightconfig.json new file mode 100644 index 00000000..0b68e164 --- /dev/null +++ b/pyrightconfig.json @@ -0,0 +1,9 @@ +{ + "exclude": [ + "docs/conf.py", + "tests", + "bench" + ], + "reportMissingImports": "error", + "reportMissingTypeStubs": false, +} \ No newline at end of file