Skip to content

Commit 34de501

Browse files
authoredMar 15, 2025··
upgrade typeguard (#2311)
fixes #2235 supersedes #2241
1 parent 7f4f2bb commit 34de501

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+10379
-902
lines changed
 

‎.github/workflows/test-stubs.yml

+12-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
os: [ubuntu-22.04]
21-
ver: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
21+
ver: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
2222
include:
2323
- os: macos-latest
2424
ver: "3.13"
@@ -48,10 +48,20 @@ jobs:
4848
- name: Install metaflow-stubs
4949
run: metaflow develop stubs install --force
5050

51+
- name: Create version-specific mypy config
52+
run: |
53+
# Copy the existing setup.cfg
54+
cp ./stubs/test/setup.cfg ./stubs/test/mypy_${{ matrix.ver }}.cfg
55+
# Add Python version setting
56+
echo "python_version = ${{ matrix.ver }}" >> ./stubs/test/mypy_${{ matrix.ver }}.cfg
57+
if [[ "${{ matrix.ver }}" == "3.7" ]]; then
58+
echo "follow_imports = skip" >> ./stubs/test/mypy_${{ matrix.ver }}.cfg
59+
fi
60+
5161
- name: Run mypy tests
5262
uses: nick-fields/retry@v2
5363
with:
5464
max_attempts: 2
5565
timeout_minutes: 3
5666
retry_on: error
57-
command: cd ./stubs && pytest --mypy-ini-file test/setup.cfg --mypy-only-local-stub && cd -
67+
command: cd ./stubs && pytest --mypy-ini-file test/mypy_${{ matrix.ver }}.cfg --mypy-only-local-stub && cd -

‎metaflow/_vendor/typeguard/_checkers.py

+259-95
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.