File tree Expand file tree Collapse file tree 3 files changed +18
-10
lines changed Expand file tree Collapse file tree 3 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -49,16 +49,24 @@ jobs:
49
49
- name : Prepare tox
50
50
run : |
51
51
V=${{ matrix.python-version }}
52
+ DO_MYPY=1
52
53
53
54
if [[ "$V" = pypy-* ]]; then
55
+ DO_MYPY=0
56
+
54
57
V=pypy3
55
- IS_PYPY=1
56
58
else
59
+ if [[ "$V" == "3.7" || "$V" == "3.8" ]]; then
60
+ DO_MYPY=0
61
+ echo "skipping $V"
62
+ else
63
+ echo "not skipping $V"
64
+ fi
65
+
57
66
V=py$(echo $V | tr -d .)
58
- IS_PYPY=0
59
67
fi
60
68
61
- echo IS_PYPY=$IS_PYPY >>$GITHUB_ENV
69
+ echo DO_MYPY=$DO_MYPY >>$GITHUB_ENV
62
70
echo TOX_PYTHON=$V >>$GITHUB_ENV
63
71
64
72
python -Im pip install tox
68
76
69
77
- run : python -Im tox run -e ${{ env.TOX_PYTHON }}-tests
70
78
- run : python -Im tox run -e ${{ env.TOX_PYTHON }}-mypy
71
- if : env.IS_PYPY == '0' && matrix.python-version != '3.7 '
79
+ if : env.DO_MYPY == '1 '
72
80
73
81
- name : Upload coverage data
74
82
uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change @@ -31,10 +31,10 @@ dynamic = ["version", "readme"]
31
31
32
32
[project .optional-dependencies ]
33
33
tests-mypy = [
34
- ' pytest-mypy-plugins; platform_python_implementation == "CPython" and python_version >= "3.8 " and python_version < "3.13"' ,
34
+ ' pytest-mypy-plugins; platform_python_implementation == "CPython" and python_version >= "3.9 " and python_version < "3.13"' ,
35
35
# Since the mypy error messages keep changing, we have to keep updating this
36
36
# pin.
37
- ' mypy>=1.6,<1.10 ; platform_python_implementation == "CPython" and python_version >= "3.8 "' ,
37
+ ' mypy>=1.10.1 ; platform_python_implementation == "CPython" and python_version >= "3.9 "' ,
38
38
]
39
39
tests = [
40
40
# For regression test to ensure cloudpickle compat doesn't break.
Original file line number Diff line number Diff line change 589
589
x: Optional[T]
590
590
@classmethod
591
591
def clsmeth(cls) -> None:
592
- reveal_type(cls) # N: Revealed type is "Type [main.A[T`1]]"
592
+ reveal_type(cls) # N: Revealed type is "type [main.A[T`1]]"
593
593
594
594
- case : testAttrsForwardReference
595
595
main : |
645
645
b: str = attr.ib()
646
646
@classmethod
647
647
def new(cls) -> A:
648
- reveal_type(cls) # N: Revealed type is "Type [main.A]"
648
+ reveal_type(cls) # N: Revealed type is "type [main.A]"
649
649
return cls(6, 'hello')
650
650
@classmethod
651
651
def bad(cls) -> A:
680
680
681
681
@classmethod
682
682
def foo(cls, x: Union[int, str]) -> Union[int, str]:
683
- reveal_type(cls) # N: Revealed type is "Type [main.A]"
683
+ reveal_type(cls) # N: Revealed type is "type [main.A]"
684
684
reveal_type(cls.other()) # N: Revealed type is "builtins.str"
685
685
return x
686
686
1411
1411
1412
1412
reveal_type(A) # N: Revealed type is "def () -> main.A"
1413
1413
if has(A):
1414
- reveal_type(A) # N: Revealed type is "Type [attr.AttrsInstance]"
1414
+ reveal_type(A) # N: Revealed type is "type [attr.AttrsInstance]"
You can’t perform that action at this time.
0 commit comments