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:
4949 - name : Prepare tox
5050 run : |
5151 V=${{ matrix.python-version }}
52+ DO_MYPY=1
5253
5354 if [[ "$V" = pypy-* ]]; then
55+ DO_MYPY=0
56+
5457 V=pypy3
55- IS_PYPY=1
5658 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+
5766 V=py$(echo $V | tr -d .)
58- IS_PYPY=0
5967 fi
6068
61- echo IS_PYPY=$IS_PYPY >>$GITHUB_ENV
69+ echo DO_MYPY=$DO_MYPY >>$GITHUB_ENV
6270 echo TOX_PYTHON=$V >>$GITHUB_ENV
6371
6472 python -Im pip install tox
6876
6977 - run : python -Im tox run -e ${{ env.TOX_PYTHON }}-tests
7078 - 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 '
7280
7381 - name : Upload coverage data
7482 uses : actions/upload-artifact@v4
Original file line number Diff line number Diff line change @@ -31,10 +31,10 @@ dynamic = ["version", "readme"]
3131
3232[project .optional-dependencies ]
3333tests-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"' ,
3535 # Since the mypy error messages keep changing, we have to keep updating this
3636 # 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 "' ,
3838]
3939tests = [
4040 # For regression test to ensure cloudpickle compat doesn't break.
Original file line number Diff line number Diff line change 589589 x: Optional[T]
590590 @classmethod
591591 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]]"
593593
594594 - case : testAttrsForwardReference
595595 main : |
645645 b: str = attr.ib()
646646 @classmethod
647647 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]"
649649 return cls(6, 'hello')
650650 @classmethod
651651 def bad(cls) -> A:
680680
681681 @classmethod
682682 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]"
684684 reveal_type(cls.other()) # N: Revealed type is "builtins.str"
685685 return x
686686
14111411
14121412 reveal_type(A) # N: Revealed type is "def () -> main.A"
14131413 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