File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 '_typeshed.SupportsKeysAndGetItem[KT, VT]' ,
2323]
2424
25- OnDuplicate : types .Literal ['raise' , 'ignore' ]
26-
2725
2826class CastedDictBase (types .Dict [KT , VT ], abc .ABC ):
2927 _key_cast : KT_cast
@@ -211,7 +209,11 @@ class UniqueList(types.List[VT]):
211209
212210 _set : set [VT ]
213211
214- def __init__ (self , * args : VT , on_duplicate : OnDuplicate = 'ignore' ):
212+ def __init__ (
213+ self ,
214+ * args : VT ,
215+ on_duplicate : types .Literal ['raise' , 'ignore' ] = 'ignore'
216+ ):
215217 self .on_duplicate = on_duplicate
216218 self ._set = set ()
217219 super ().__init__ ()
Original file line number Diff line number Diff line change 11import datetime
22import decimal
3+ import sys
34from typing import * # type: ignore # pragma: no cover
45
56# import * does not import Pattern
67from typing import Pattern
78
8- try :
9- from typing import Literal , SupportsIndex # type: ignore
10- except ImportError :
9+ if sys . version_info >= ( 3 , 8 ): # pragma: no cover
10+ from typing import Literal , SupportsIndex
11+ else : # pragma: no cover
1112 from typing_extensions import Literal , SupportsIndex
1213
1314# Quickhand for optional because it gets so much use. If only Python had
3839 None ,
3940]
4041
41- assert Pattern # type: ignore
42- assert Literal
43- assert SupportsIndex
42+ assert Pattern is not None # type: ignore
43+ assert Literal is not None
44+ assert SupportsIndex is not None
4445
4546__all__ = [
4647 'OptionalScope' ,
Original file line number Diff line number Diff line change 1414else :
1515 long_description = 'See http://pypi.python.org/pypi/python-utils/'
1616
17- install_requires = []
18-
1917if __name__ == '__main__' :
2018 setuptools .setup (
2119 python_requires = '>3.6.0' ,
You can’t perform that action at this time.
0 commit comments