File tree Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Expand file tree Collapse file tree 3 files changed +18
-8
lines changed Original file line number Diff line number Diff line change 1818 with :
1919 python-version : ${{ matrix.python-version }}
2020 - name : Run image
21- uses : abatilo/actions-poetry@v2
21+ uses : abatilo/actions-poetry@v2.1.6
2222 with :
2323 poetry-version : ${{ env.POETRY_VERSION }}
2424 - run : poetry config virtualenvs.in-project true
Original file line number Diff line number Diff line change 88
99from typing_extensions import Final as Final_ext
1010
11- if sys .version_info >= (3 , 8 ):
11+ if sys .version_info >= (3 , 9 ):
12+ # Despite the fact that Literal is in 3.8, it is just a _GenericAlias,
13+ # so would be broken
1214 from typing import Final , Literal
1315
1416 LiteralType : Final = type (Literal [1 ])
Original file line number Diff line number Diff line change 11import sys
2+ from typing import Union
23
3- if sys .version_info >= (3 , 8 ):
4- from typing import Literal , Union
4+ import pytest
5+
6+
7+ @pytest .mark .skipif (sys .version_info < (3 , 9 ))
8+ def test_literal_type_positive () -> None :
9+ from typing import Literal
510
611 from basedtyping .runtime_only import LiteralType
712
8- def test_literal_type_positive () -> None :
9- assert isinstance (Literal [1 , 2 ], LiteralType )
13+ assert isinstance (Literal [1 , 2 ], LiteralType )
14+
15+
16+ @pytest .mark .skipif (sys .version_info < (3 , 9 ))
17+ def test_literal_type_negative () -> None :
18+ from basedtyping .runtime_only import LiteralType
1019
11- def test_literal_type_negative () -> None :
12- assert not isinstance (Union [int , str ], LiteralType )
20+ assert not isinstance (Union [int , str ], LiteralType )
You can’t perform that action at this time.
0 commit comments