/usr/lib64/python3.9/__pycache__
NameSizeModeActions
abc.cpython-39.opt-1.pyc57750644editdlrm
abc.cpython-39.opt-2.pyc32160644editdlrm
abc.cpython-39.pyc57750644editdlrm
aifc.cpython-39.opt-1.pyc252660644editdlrm
aifc.cpython-39.opt-2.pyc200590644editdlrm
aifc.cpython-39.pyc252660644editdlrm
antigravity.cpython-39.opt-1.pyc8190644editdlrm
antigravity.cpython-39.opt-2.pyc6750644editdlrm
antigravity.cpython-39.pyc8190644editdlrm
argparse.cpython-39.opt-1.pyc635430644editdlrm
argparse.cpython-39.opt-2.pyc541790644editdlrm
argparse.cpython-39.pyc636540644editdlrm
ast.cpython-39.opt-1.pyc523320644editdlrm
ast.cpython-39.opt-2.pyc437870644editdlrm
ast.cpython-39.pyc523830644editdlrm
asynchat.cpython-39.opt-1.pyc68220644editdlrm
asynchat.cpython-39.opt-2.pyc54470644editdlrm
asynchat.cpython-39.pyc68220644editdlrm
asyncore.cpython-39.opt-1.pyc160360644editdlrm
asyncore.cpython-39.opt-2.pyc148320644editdlrm
asyncore.cpython-39.pyc160360644editdlrm
base64.cpython-39.opt-1.pyc163230644editdlrm
base64.cpython-39.opt-2.pyc108030644editdlrm
base64.cpython-39.pyc164550644editdlrm
bdb.cpython-39.opt-1.pyc245400644editdlrm
bdb.cpython-39.opt-2.pyc155030644editdlrm
bdb.cpython-39.pyc245400644editdlrm
binhex.cpython-39.opt-1.pyc129650644editdlrm
binhex.cpython-39.opt-2.pyc124310644editdlrm
binhex.cpython-39.pyc129650644editdlrm
bisect.cpython-39.opt-1.pyc23500644editdlrm
bisect.cpython-39.opt-2.pyc10380644editdlrm
bisect.cpython-39.pyc23500644editdlrm
bz2.cpython-39.opt-1.pyc115450644editdlrm
bz2.cpython-39.opt-2.pyc65290644editdlrm
bz2.cpython-39.pyc115450644editdlrm
calendar.cpython-39.opt-1.pyc270310644editdlrm
calendar.cpython-39.opt-2.pyc224390644editdlrm
calendar.cpython-39.pyc270310644editdlrm
cgi.cpython-39.opt-1.pyc264820644editdlrm
cgi.cpython-39.opt-2.pyc180560644editdlrm
cgi.cpython-39.pyc264820644editdlrm
cgitb.cpython-39.opt-1.pyc101860644editdlrm
cgitb.cpython-39.opt-2.pyc85870644editdlrm
cgitb.cpython-39.pyc101860644editdlrm
chunk.cpython-39.opt-1.pyc48410644editdlrm
chunk.cpython-39.opt-2.pyc26970644editdlrm
chunk.cpython-39.pyc48410644editdlrm
cmd.cpython-39.opt-1.pyc126760644editdlrm
cmd.cpython-39.opt-2.pyc72510644editdlrm
cmd.cpython-39.pyc126760644editdlrm
code.cpython-39.opt-1.pyc99160644editdlrm
code.cpython-39.opt-2.pyc46450644editdlrm
code.cpython-39.pyc99160644editdlrm
codecs.cpython-39.opt-1.pyc338880644editdlrm
codecs.cpython-39.opt-2.pyc183160644editdlrm
codecs.cpython-39.pyc338880644editdlrm
codeop.cpython-39.opt-1.pyc64580644editdlrm
codeop.cpython-39.opt-2.pyc23980644editdlrm
codeop.cpython-39.pyc64580644editdlrm
colorsys.cpython-39.opt-1.pyc32600644editdlrm
colorsys.cpython-39.opt-2.pyc26540644editdlrm
colorsys.cpython-39.pyc32600644editdlrm
compileall.cpython-39.opt-1.pyc125890644editdlrm
compileall.cpython-39.opt-2.pyc93300644editdlrm
compileall.cpython-39.pyc125890644editdlrm
configparser.cpython-39.opt-1.pyc458690644editdlrm
configparser.cpython-39.opt-2.pyc307290644editdlrm
configparser.cpython-39.pyc458690644editdlrm
contextlib.cpython-39.opt-1.pyc195280644editdlrm
contextlib.cpython-39.opt-2.pyc139430644editdlrm
contextlib.cpython-39.pyc195380644editdlrm
contextvars.cpython-39.opt-1.pyc2450644editdlrm
contextvars.cpython-39.opt-2.pyc2450644editdlrm
contextvars.cpython-39.pyc2450644editdlrm
copy.cpython-39.opt-1.pyc69630644editdlrm
copy.cpython-39.opt-2.pyc46600644editdlrm
copy.cpython-39.pyc69630644editdlrm
copyreg.cpython-39.opt-1.pyc44110644editdlrm
copyreg.cpython-39.opt-2.pyc36090644editdlrm
copyreg.cpython-39.pyc44300644editdlrm
cProfile.cpython-39.opt-1.pyc51160644editdlrm
cProfile.cpython-39.opt-2.pyc46550644editdlrm
cProfile.cpython-39.pyc51160644editdlrm
crypt.cpython-39.opt-1.pyc35130644editdlrm
crypt.cpython-39.opt-2.pyc28510644editdlrm
crypt.cpython-39.pyc35130644editdlrm
csv.cpython-39.opt-1.pyc118490644editdlrm
csv.cpython-39.opt-2.pyc98080644editdlrm
csv.cpython-39.pyc118490644editdlrm
dataclasses.cpython-39.opt-1.pyc232170644editdlrm
dataclasses.cpython-39.opt-2.pyc197780644editdlrm
dataclasses.cpython-39.pyc232170644editdlrm
datetime.cpython-39.opt-1.pyc569740644editdlrm
datetime.cpython-39.opt-2.pyc485300644editdlrm
datetime.cpython-39.pyc581150644editdlrm
decimal.cpython-39.opt-1.pyc3590644editdlrm
decimal.cpython-39.opt-2.pyc3590644editdlrm
decimal.cpython-39.pyc3590644editdlrm
difflib.cpython-39.opt-1.pyc585580644editdlrm
difflib.cpython-39.opt-2.pyc250240644editdlrm
difflib.cpython-39.pyc585800644editdlrm
dis.cpython-39.opt-1.pyc158200644editdlrm
dis.cpython-39.opt-2.pyc120130644editdlrm
dis.cpython-39.pyc158200644editdlrm
doctest.cpython-39.opt-1.pyc758320644editdlrm
doctest.cpython-39.opt-2.pyc405260644editdlrm
doctest.cpython-39.pyc760390644editdlrm
enum.cpython-39.opt-1.pyc260200644editdlrm
enum.cpython-39.opt-2.pyc210980644editdlrm
enum.cpython-39.pyc260200644editdlrm
filecmp.cpython-39.opt-1.pyc86220644editdlrm
filecmp.cpython-39.opt-2.pyc60840644editdlrm
filecmp.cpython-39.pyc86220644editdlrm
fileinput.cpython-39.opt-1.pyc137900644editdlrm
fileinput.cpython-39.opt-2.pyc81820644editdlrm
fileinput.cpython-39.pyc137900644editdlrm
fnmatch.cpython-39.opt-1.pyc38700644editdlrm
fnmatch.cpython-39.opt-2.pyc26620644editdlrm
fnmatch.cpython-39.pyc39420644editdlrm
formatter.cpython-39.opt-1.pyc175390644editdlrm
formatter.cpython-39.opt-2.pyc150990644editdlrm
formatter.cpython-39.pyc175390644editdlrm
fractions.cpython-39.opt-1.pyc180490644editdlrm
fractions.cpython-39.opt-2.pyc108490644editdlrm
fractions.cpython-39.pyc180490644editdlrm
ftplib.cpython-39.opt-1.pyc286940644editdlrm
ftplib.cpython-39.opt-2.pyc185500644editdlrm
ftplib.cpython-39.pyc286940644editdlrm
functools.cpython-39.opt-1.pyc287230644editdlrm
functools.cpython-39.opt-2.pyc220020644editdlrm
functools.cpython-39.pyc287230644editdlrm
genericpath.cpython-39.opt-1.pyc45410644editdlrm
genericpath.cpython-39.opt-2.pyc33580644editdlrm
genericpath.cpython-39.pyc45410644editdlrm
getopt.cpython-39.opt-1.pyc62420644editdlrm
getopt.cpython-39.opt-2.pyc36880644editdlrm
getopt.cpython-39.pyc62600644editdlrm
getpass.cpython-39.opt-1.pyc42000644editdlrm
getpass.cpython-39.opt-2.pyc30140644editdlrm
getpass.cpython-39.pyc42000644editdlrm
gettext.cpython-39.opt-1.pyc180730644editdlrm
gettext.cpython-39.opt-2.pyc173820644editdlrm
gettext.cpython-39.pyc180730644editdlrm
glob.cpython-39.opt-1.pyc45050644editdlrm
glob.cpython-39.opt-2.pyc36450644editdlrm
glob.cpython-39.pyc45440644editdlrm
graphlib.cpython-39.opt-1.pyc75220644editdlrm
graphlib.cpython-39.opt-2.pyc40860644editdlrm
graphlib.cpython-39.pyc75680644editdlrm
gzip.cpython-39.opt-1.pyc184940644editdlrm
gzip.cpython-39.opt-2.pyc146270644editdlrm
gzip.cpython-39.pyc184940644editdlrm
hashlib.cpython-39.opt-1.pyc52050644editdlrm
hashlib.cpython-39.opt-2.pyc48800644editdlrm
hashlib.cpython-39.pyc52050644editdlrm
heapq.cpython-39.opt-1.pyc140400644editdlrm
heapq.cpython-39.opt-2.pyc110240644editdlrm
heapq.cpython-39.pyc140400644editdlrm
hmac.cpython-39.opt-1.pyc71230644editdlrm
hmac.cpython-39.opt-2.pyc46040644editdlrm
hmac.cpython-39.pyc71230644editdlrm
imaplib.cpython-39.opt-1.pyc405070644editdlrm
imaplib.cpython-39.opt-2.pyc278240644editdlrm
imaplib.cpython-39.pyc426880644editdlrm
imghdr.cpython-39.opt-1.pyc41400644editdlrm
imghdr.cpython-39.opt-2.pyc38250644editdlrm
imghdr.cpython-39.pyc41400644editdlrm
imp.cpython-39.opt-1.pyc98510644editdlrm
imp.cpython-39.opt-2.pyc74860644editdlrm
imp.cpython-39.pyc98510644editdlrm
inspect.cpython-39.opt-1.pyc812300644editdlrm
inspect.cpython-39.opt-2.pyc561020644editdlrm
inspect.cpython-39.pyc814720644editdlrm
io.cpython-39.opt-1.pyc34080644editdlrm
io.cpython-39.opt-2.pyc19190644editdlrm
io.cpython-39.pyc34080644editdlrm
ipaddress.cpython-39.opt-1.pyc656820644editdlrm
ipaddress.cpython-39.opt-2.pyc397020644editdlrm
ipaddress.cpython-39.pyc656820644editdlrm
keyword.cpython-39.opt-1.pyc9160644editdlrm
keyword.cpython-39.opt-2.pyc5120644editdlrm
keyword.cpython-39.pyc9160644editdlrm
linecache.cpython-39.opt-1.pyc40280644editdlrm
linecache.cpython-39.opt-2.pyc27950644editdlrm
linecache.cpython-39.pyc40280644editdlrm
locale.cpython-39.opt-1.pyc346960644editdlrm
locale.cpython-39.opt-2.pyc300780644editdlrm
locale.cpython-39.pyc346960644editdlrm
lzma.cpython-39.opt-1.pyc120940644editdlrm
lzma.cpython-39.opt-2.pyc58960644editdlrm
lzma.cpython-39.pyc120940644editdlrm
mailbox.cpython-39.opt-1.pyc605460644editdlrm
mailbox.cpython-39.opt-2.pyc539420644editdlrm
mailbox.cpython-39.pyc606000644editdlrm
mailcap.cpython-39.opt-1.pyc72390644editdlrm
mailcap.cpython-39.opt-2.pyc56690644editdlrm
mailcap.cpython-39.pyc72390644editdlrm
mimetypes.cpython-39.opt-1.pyc160150644editdlrm
mimetypes.cpython-39.opt-2.pyc100000644editdlrm
mimetypes.cpython-39.pyc160150644editdlrm
modulefinder.cpython-39.opt-1.pyc160820644editdlrm
modulefinder.cpython-39.opt-2.pyc151730644editdlrm
modulefinder.cpython-39.pyc161280644editdlrm
netrc.cpython-39.opt-1.pyc37830644editdlrm
netrc.cpython-39.opt-2.pyc35450644editdlrm
netrc.cpython-39.pyc37830644editdlrm
nntplib.cpython-39.opt-1.pyc317630644editdlrm
nntplib.cpython-39.opt-2.pyc201630644editdlrm
nntplib.cpython-39.pyc317630644editdlrm
ntpath.cpython-39.opt-1.pyc142710644editdlrm
ntpath.cpython-39.opt-2.pyc122200644editdlrm
ntpath.cpython-39.pyc142710644editdlrm
nturl2path.cpython-39.opt-1.pyc17460644editdlrm
nturl2path.cpython-39.opt-2.pyc13270644editdlrm
nturl2path.cpython-39.pyc17460644editdlrm
numbers.cpython-39.opt-1.pyc123190644editdlrm
numbers.cpython-39.opt-2.pyc83620644editdlrm
numbers.cpython-39.pyc123190644editdlrm
opcode.cpython-39.opt-1.pyc52230644editdlrm
opcode.cpython-39.opt-2.pyc50820644editdlrm
opcode.cpython-39.pyc52230644editdlrm
operator.cpython-39.opt-1.pyc137840644editdlrm
operator.cpython-39.opt-2.pyc113950644editdlrm
operator.cpython-39.pyc137840644editdlrm
optparse.cpython-39.opt-1.pyc478880644editdlrm
optparse.cpython-39.opt-2.pyc355730644editdlrm
optparse.cpython-39.pyc479430644editdlrm
os.cpython-39.opt-1.pyc316300644editdlrm
os.cpython-39.opt-2.pyc194400644editdlrm
os.cpython-39.pyc316460644editdlrm
pathlib.cpython-39.opt-1.pyc435280644editdlrm
pathlib.cpython-39.opt-2.pyc346680644editdlrm
pathlib.cpython-39.pyc435280644editdlrm
pdb.cpython-39.opt-1.pyc475470644editdlrm
pdb.cpython-39.opt-2.pyc334760644editdlrm
pdb.cpython-39.pyc475860644editdlrm
pickle.cpython-39.opt-1.pyc470120644editdlrm
pickle.cpython-39.opt-2.pyc411420644editdlrm
pickle.cpython-39.pyc470980644editdlrm
pickletools.cpython-39.opt-1.pyc662930644editdlrm
pickletools.cpython-39.opt-2.pyc572000644editdlrm
pickletools.cpython-39.pyc671070644editdlrm
pipes.cpython-39.opt-1.pyc77950644editdlrm
pipes.cpython-39.opt-2.pyc49280644editdlrm
pipes.cpython-39.pyc77950644editdlrm
pkgutil.cpython-39.opt-1.pyc185660644editdlrm
pkgutil.cpython-39.opt-2.pyc118670644editdlrm
pkgutil.cpython-39.pyc185660644editdlrm
platform.cpython-39.opt-1.pyc264160644editdlrm
platform.cpython-39.opt-2.pyc183480644editdlrm
platform.cpython-39.pyc264160644editdlrm
plistlib.cpython-39.opt-1.pyc234960644editdlrm
plistlib.cpython-39.opt-2.pyc211370644editdlrm
plistlib.cpython-39.pyc235470644editdlrm
poplib.cpython-39.opt-1.pyc137540644editdlrm
poplib.cpython-39.opt-2.pyc88240644editdlrm
poplib.cpython-39.pyc137540644editdlrm
posixpath.cpython-39.opt-1.pyc106420644editdlrm
posixpath.cpython-39.opt-2.pyc89270644editdlrm
posixpath.cpython-39.pyc106420644editdlrm
pprint.cpython-39.opt-1.pyc167970644editdlrm
pprint.cpython-39.opt-2.pyc146400644editdlrm
pprint.cpython-39.pyc168300644editdlrm
profile.cpython-39.opt-1.pyc142230644editdlrm
profile.cpython-39.opt-2.pyc112450644editdlrm
profile.cpython-39.pyc144110644editdlrm
pstats.cpython-39.opt-1.pyc237520644editdlrm
pstats.cpython-39.opt-2.pyc208430644editdlrm
pstats.cpython-39.pyc237520644editdlrm
pty.cpython-39.opt-1.pyc39560644editdlrm
pty.cpython-39.opt-2.pyc31110644editdlrm
pty.cpython-39.pyc39560644editdlrm
pyclbr.cpython-39.opt-1.pyc104490644editdlrm
pyclbr.cpython-39.opt-2.pyc68480644editdlrm
pyclbr.cpython-39.pyc104490644editdlrm
pydoc.cpython-39.opt-1.pyc854280644editdlrm
pydoc.cpython-39.opt-2.pyc755460644editdlrm
pydoc.cpython-39.pyc854600644editdlrm
py_compile.cpython-39.opt-1.pyc73960644editdlrm
py_compile.cpython-39.opt-2.pyc36580644editdlrm
py_compile.cpython-39.pyc73960644editdlrm
queue.cpython-39.opt-1.pyc108760644editdlrm
queue.cpython-39.opt-2.pyc65260644editdlrm
queue.cpython-39.pyc108760644editdlrm
quopri.cpython-39.opt-1.pyc56030644editdlrm
quopri.cpython-39.opt-2.pyc45670644editdlrm
quopri.cpython-39.pyc57470644editdlrm
random.cpython-39.opt-1.pyc220430644editdlrm
random.cpython-39.opt-2.pyc145960644editdlrm
random.cpython-39.pyc220430644editdlrm
re.cpython-39.opt-1.pyc143620644editdlrm
re.cpython-39.opt-2.pyc60240644editdlrm
re.cpython-39.pyc143620644editdlrm
reprlib.cpython-39.opt-1.pyc53070644editdlrm
reprlib.cpython-39.opt-2.pyc51510644editdlrm
reprlib.cpython-39.pyc53070644editdlrm
rlcompleter.cpython-39.opt-1.pyc58060644editdlrm
rlcompleter.cpython-39.opt-2.pyc31430644editdlrm
rlcompleter.cpython-39.pyc58060644editdlrm
runpy.cpython-39.opt-1.pyc93850644editdlrm
runpy.cpython-39.opt-2.pyc69430644editdlrm
runpy.cpython-39.pyc93850644editdlrm
sched.cpython-39.opt-1.pyc66330644editdlrm
sched.cpython-39.opt-2.pyc36050644editdlrm
sched.cpython-39.pyc66330644editdlrm
secrets.cpython-39.opt-1.pyc21800644editdlrm
secrets.cpython-39.opt-2.pyc11220644editdlrm
secrets.cpython-39.pyc21800644editdlrm
selectors.cpython-39.opt-1.pyc172450644editdlrm
selectors.cpython-39.opt-2.pyc131360644editdlrm
selectors.cpython-39.pyc172450644editdlrm
shelve.cpython-39.opt-1.pyc95440644editdlrm
shelve.cpython-39.opt-2.pyc53930644editdlrm
shelve.cpython-39.pyc95440644editdlrm
shlex.cpython-39.opt-1.pyc77340644editdlrm
shlex.cpython-39.opt-2.pyc71760644editdlrm
shlex.cpython-39.pyc77340644editdlrm
shutil.cpython-39.opt-1.pyc384970644editdlrm
shutil.cpython-39.opt-2.pyc264290644editdlrm
shutil.cpython-39.pyc384970644editdlrm
signal.cpython-39.opt-1.pyc30060644editdlrm
signal.cpython-39.opt-2.pyc27820644editdlrm
signal.cpython-39.pyc30060644editdlrm
site.cpython-39.opt-1.pyc172290644editdlrm
site.cpython-39.opt-2.pyc115550644editdlrm
site.cpython-39.pyc172290644editdlrm
smtpd.cpython-39.opt-1.pyc265240644editdlrm
smtpd.cpython-39.opt-2.pyc239040644editdlrm
smtpd.cpython-39.pyc265240644editdlrm
smtplib.cpython-39.opt-1.pyc358850644editdlrm
smtplib.cpython-39.opt-2.pyc195230644editdlrm
smtplib.cpython-39.pyc359300644editdlrm
sndhdr.cpython-39.opt-1.pyc69930644editdlrm
sndhdr.cpython-39.opt-2.pyc57180644editdlrm
sndhdr.cpython-39.pyc69930644editdlrm
socket.cpython-39.opt-1.pyc289760644editdlrm
socket.cpython-39.opt-2.pyc204370644editdlrm
socket.cpython-39.pyc290000644editdlrm
socketserver.cpython-39.opt-1.pyc255150644editdlrm
socketserver.cpython-39.opt-2.pyc147990644editdlrm
socketserver.cpython-39.pyc255150644editdlrm
sre_compile.cpython-39.opt-1.pyc149590644editdlrm
sre_compile.cpython-39.opt-2.pyc145450644editdlrm
sre_compile.cpython-39.pyc151540644editdlrm
sre_constants.cpython-39.opt-1.pyc63360644editdlrm
sre_constants.cpython-39.opt-2.pyc59110644editdlrm
sre_constants.cpython-39.pyc63360644editdlrm
sre_parse.cpython-39.opt-1.pyc217720644editdlrm
sre_parse.cpython-39.opt-2.pyc217240644editdlrm
sre_parse.cpython-39.pyc218090644editdlrm
ssl.cpython-39.opt-1.pyc451060644editdlrm
ssl.cpython-39.opt-2.pyc341220644editdlrm
ssl.cpython-39.pyc451060644editdlrm
stat.cpython-39.opt-1.pyc43720644editdlrm
stat.cpython-39.opt-2.pyc35890644editdlrm
stat.cpython-39.pyc43720644editdlrm
statistics.cpython-39.opt-1.pyc317840644editdlrm
statistics.cpython-39.opt-2.pyc159110644editdlrm
statistics.cpython-39.pyc319780644editdlrm
string.cpython-39.opt-1.pyc71650644editdlrm
string.cpython-39.opt-2.pyc60590644editdlrm
string.cpython-39.pyc71650644editdlrm
stringprep.cpython-39.opt-1.pyc99460644editdlrm
stringprep.cpython-39.opt-2.pyc97280644editdlrm
stringprep.cpython-39.pyc99860644editdlrm
struct.cpython-39.opt-1.pyc3060644editdlrm
struct.cpython-39.opt-2.pyc3060644editdlrm
struct.cpython-39.pyc3060644editdlrm
subprocess.cpython-39.opt-1.pyc443100644editdlrm
subprocess.cpython-39.opt-2.pyc322720644editdlrm
subprocess.cpython-39.pyc443860644editdlrm
sunau.cpython-39.opt-1.pyc168170644editdlrm
sunau.cpython-39.opt-2.pyc122270644editdlrm
sunau.cpython-39.pyc168170644editdlrm
symbol.cpython-39.opt-1.pyc25790644editdlrm
symbol.cpython-39.opt-2.pyc25030644editdlrm
symbol.cpython-39.pyc25790644editdlrm
symtable.cpython-39.opt-1.pyc110880644editdlrm
symtable.cpython-39.opt-2.pyc103590644editdlrm
symtable.cpython-39.pyc111660644editdlrm
sysconfig.cpython-39.opt-1.pyc162040644editdlrm
sysconfig.cpython-39.opt-2.pyc138260644editdlrm
sysconfig.cpython-39.pyc162040644editdlrm
tabnanny.cpython-39.opt-1.pyc70650644editdlrm
tabnanny.cpython-39.opt-2.pyc61320644editdlrm
tabnanny.cpython-39.pyc70650644editdlrm
tarfile.cpython-39.opt-1.pyc737630644editdlrm
tarfile.cpython-39.opt-2.pyc585050644editdlrm
tarfile.cpython-39.pyc737780644editdlrm
telnetlib.cpython-39.opt-1.pyc183310644editdlrm
telnetlib.cpython-39.opt-2.pyc108290644editdlrm
telnetlib.cpython-39.pyc183310644editdlrm
tempfile.cpython-39.opt-1.pyc236560644editdlrm
tempfile.cpython-39.opt-2.pyc171300644editdlrm
tempfile.cpython-39.pyc236560644editdlrm
textwrap.cpython-39.opt-1.pyc134630644editdlrm
textwrap.cpython-39.opt-2.pyc62540644editdlrm
textwrap.cpython-39.pyc135210644editdlrm
this.cpython-39.opt-1.pyc12590644editdlrm
this.cpython-39.opt-2.pyc12590644editdlrm
this.cpython-39.pyc12590644editdlrm
threading.cpython-39.opt-1.pyc417160644editdlrm
threading.cpython-39.opt-2.pyc245290644editdlrm
threading.cpython-39.pyc421810644editdlrm
timeit.cpython-39.opt-1.pyc117560644editdlrm
timeit.cpython-39.opt-2.pyc59020644editdlrm
timeit.cpython-39.pyc117560644editdlrm
token.cpython-39.opt-1.pyc24960644editdlrm
token.cpython-39.opt-2.pyc24630644editdlrm
token.cpython-39.pyc24960644editdlrm
tokenize.cpython-39.opt-1.pyc171370644editdlrm
tokenize.cpython-39.opt-2.pyc133730644editdlrm
tokenize.cpython-39.pyc171650644editdlrm
trace.cpython-39.opt-1.pyc197590644editdlrm
trace.cpython-39.opt-2.pyc167440644editdlrm
trace.cpython-39.pyc197590644editdlrm
traceback.cpython-39.opt-1.pyc204400644editdlrm
traceback.cpython-39.opt-2.pyc114870644editdlrm
traceback.cpython-39.pyc204400644editdlrm
tracemalloc.cpython-39.opt-1.pyc179350644editdlrm
tracemalloc.cpython-39.opt-2.pyc165220644editdlrm
tracemalloc.cpython-39.pyc179350644editdlrm
tty.cpython-39.opt-1.pyc10780644editdlrm
tty.cpython-39.opt-2.pyc9690644editdlrm
tty.cpython-39.pyc10780644editdlrm
types.cpython-39.opt-1.pyc92360644editdlrm
types.cpython-39.opt-2.pyc80140644editdlrm
types.cpython-39.pyc92360644editdlrm
typing.cpython-39.opt-1.pyc718050644editdlrm
typing.cpython-39.opt-2.pyc505570644editdlrm
typing.cpython-39.pyc719350644editdlrm
uu.cpython-39.opt-1.pyc38470644editdlrm
uu.cpython-39.opt-2.pyc36030644editdlrm
uu.cpython-39.pyc38470644editdlrm
uuid.cpython-39.opt-1.pyc223970644editdlrm
uuid.cpython-39.opt-2.pyc146840644editdlrm
uuid.cpython-39.pyc225100644editdlrm
warnings.cpython-39.opt-1.pyc131660644editdlrm
warnings.cpython-39.opt-2.pyc108910644editdlrm
warnings.cpython-39.pyc136050644editdlrm
wave.cpython-39.opt-1.pyc178440644editdlrm
wave.cpython-39.opt-2.pyc118520644editdlrm
wave.cpython-39.pyc178730644editdlrm
weakref.cpython-39.opt-1.pyc202710644editdlrm
weakref.cpython-39.opt-2.pyc169860644editdlrm
weakref.cpython-39.pyc202850644editdlrm
webbrowser.cpython-39.opt-1.pyc175650644editdlrm
webbrowser.cpython-39.opt-2.pyc150860644editdlrm
webbrowser.cpython-39.pyc175820644editdlrm
xdrlib.cpython-39.opt-1.pyc82430644editdlrm
xdrlib.cpython-39.opt-2.pyc77580644editdlrm
xdrlib.cpython-39.pyc82430644editdlrm
zipapp.cpython-39.opt-1.pyc59850644editdlrm
zipapp.cpython-39.opt-2.pyc48090644editdlrm
zipapp.cpython-39.pyc59850644editdlrm
zipfile.cpython-39.opt-1.pyc598670644editdlrm
zipfile.cpython-39.opt-2.pyc508790644editdlrm
zipfile.cpython-39.pyc598880644editdlrm
zipimport.cpython-39.opt-1.pyc171590644editdlrm
zipimport.cpython-39.opt-2.pyc136410644editdlrm
zipimport.cpython-39.pyc172370644editdlrm
_aix_support.cpython-39.opt-1.pyc30460644editdlrm
_aix_support.cpython-39.opt-2.pyc16910644editdlrm
_aix_support.cpython-39.pyc30460644editdlrm
_bootlocale.cpython-39.opt-1.pyc12170644editdlrm
_bootlocale.cpython-39.opt-2.pyc9920644editdlrm
_bootlocale.cpython-39.pyc12270644editdlrm
_bootsubprocess.cpython-39.opt-1.pyc22450644editdlrm
_bootsubprocess.cpython-39.opt-2.pyc20160644editdlrm
_bootsubprocess.cpython-39.pyc22450644editdlrm
_collections_abc.cpython-39.opt-1.pyc317310644editdlrm
_collections_abc.cpython-39.opt-2.pyc262410644editdlrm
_collections_abc.cpython-39.pyc317310644editdlrm
_compat_pickle.cpython-39.opt-1.pyc54350644editdlrm
_compat_pickle.cpython-39.opt-2.pyc54350644editdlrm
_compat_pickle.cpython-39.pyc54880644editdlrm
_compression.cpython-39.opt-1.pyc41980644editdlrm
_compression.cpython-39.opt-2.pyc39840644editdlrm
_compression.cpython-39.pyc41980644editdlrm
_markupbase.cpython-39.opt-1.pyc76260644editdlrm
_markupbase.cpython-39.opt-2.pyc72480644editdlrm
_markupbase.cpython-39.pyc77770644editdlrm
_osx_support.cpython-39.opt-1.pyc115820644editdlrm
_osx_support.cpython-39.opt-2.pyc88920644editdlrm
_osx_support.cpython-39.pyc115820644editdlrm
_pydecimal.cpython-39.opt-1.pyc1606130644editdlrm
_pydecimal.cpython-39.opt-2.pyc789960644editdlrm
_pydecimal.cpython-39.pyc1606130644editdlrm
_pyio.cpython-39.opt-1.pyc743670644editdlrm
_pyio.cpython-39.opt-2.pyc515700644editdlrm
_pyio.cpython-39.pyc743870644editdlrm
_py_abc.cpython-39.opt-1.pyc46340644editdlrm
_py_abc.cpython-39.opt-2.pyc34210644editdlrm
_py_abc.cpython-39.pyc46560644editdlrm
_sitebuiltins.cpython-39.opt-1.pyc35010644editdlrm
_sitebuiltins.cpython-39.opt-2.pyc29770644editdlrm
_sitebuiltins.cpython-39.pyc35010644editdlrm
_strptime.cpython-39.opt-1.pyc160150644editdlrm
_strptime.cpython-39.opt-2.pyc122870644editdlrm
_strptime.cpython-39.pyc160150644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-39.opt-1.pyc307880644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-39.opt-2.pyc307880644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-39.pyc307880644editdlrm
_threading_local.cpython-39.opt-1.pyc65060644editdlrm
_threading_local.cpython-39.opt-2.pyc31860644editdlrm
_threading_local.cpython-39.pyc65060644editdlrm
_weakrefset.cpython-39.opt-1.pyc77240644editdlrm
_weakrefset.cpython-39.opt-2.pyc77240644editdlrm
_weakrefset.cpython-39.pyc77240644editdlrm
__future__.cpython-39.opt-1.pyc41260644editdlrm
__future__.cpython-39.opt-2.pyc21540644editdlrm
__future__.cpython-39.pyc41260644editdlrm
__phello__.foo.cpython-39.opt-1.pyc1290644editdlrm
__phello__.foo.cpython-39.opt-2.pyc1290644editdlrm
__phello__.foo.cpython-39.pyc1290644editdlrm
Edit: /usr/lib64/python3.9/__pycache__/typing.cpython-39.pyc (71935B)
a i,@sdZddlmZmZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl m Z mZmZmZgdZddddd Zdddd d Zd dZddZddZddZddZddZgZdddddZefddZGdddZGd d!d!ZGd"d#d#ed d$Z Gd%d&d&e d d$Z!e d'd(Z"e d)d*Z#e d+d,Z$e d-d.Z%e d/d0Z&e d1d2Z'e!ed dd3d4Z(Gd5d6d6ed d$Z)Gd7d8d8eed d$Z*d9d:Z+Gd;d<dd>e,d d$Z-Gd?d@d@e,d d$Z.GdAdBdBe-d d$Z/GdCdDdDe.d d$Z0GdEdFdFe.d d$Z1GdGdHdHe-d d$Z2dIdJZ3GdKdLdLe-d d$Z4GdMdNdNZ5GdOdPdPZ6GdQdRdRZ7gdSZ8gdTZ9e8e9dUgZ:dVdWZ;dXdYZgd^d_d`gdaZ?GdbdcdceZ@Gdddedee5e@dfZAGdgdhdhe-d d$ZBGdidjdjZCdkdlZDdmdnZEdodpZFe jGe jHe jIe jJe eefZKddqdrZLdsdtZMdudvZNdwdxZOdydzZPd{d|ZQd}d~ZRddZSddZTe*dZUe*dZVe*dZWe*dd dZXe*dd dZYe*dd dZZe*dd dZ[e*dd e\dZ]e*de^e_Z`e.ZaeaejjbdZbeaejjcdZceaejjddZdeaejjedZeeaejjfdZfeaejjgdZgeaejjhdZheaejjidZieaejjjdZjeaejjkdZkeaejjldZle0ejjmdZmdem_eaejjndddZoeaejjpdZpeaejjqdZqeaejjrdZreaejjsdZseaejjtdZteaejjudZue1evddddZwdew_eaexddddZyeaejzdddZ{eae|ddddZneaeddddZ}eaejj~dZ~eaejjdZeaejjdZeaejjdZeaejdddZeaejdddZeaeddddZeaejdddZeaejdZeaejdZeaejdZeaejjdZeaejjdZeae\ddddZde_eDGdddeAZeDGdddeAZeDGdddeAZeDGdddeAZeDGdddeAZeDGdddeAeXZeDGdddeAeXZdddZehdZehdZGddde\ZdddZe\eddiZddZee_Gddde\Zdd dddZe\eddiZdd„e_ddĄZe_ZdZGddƄde5e`ZGddȄdee^ZGddʄdee_ZGdd̄d̃Zede_ee jej<eae jdZeae jdZGddτdσZ ede _e e je j<dS)a= The typing module: Support for gradual typing as defined by PEP 484. At large scale, the structure of the module is following: * Imports and exports, all public names should be explicitly added to __all__. * Internal helper functions: these should never be used in code outside this module. * _SpecialForm and its instances (special forms): Any, NoReturn, ClassVar, Union, Optional * Two classes whose instances can be type arguments in addition to types: ForwardRef and TypeVar * The core of internal generics API: _GenericAlias and _VariadicGenericAlias, the latter is currently only used by Tuple and Callable. All subscripted types like X[int], Union[int, str], etc., are instances of either of these classes. * The public counterpart of the generics API consists of two classes: Generic and Protocol. * Public helper functions: get_type_hints, overload, cast, no_type_check, no_type_check_decorator. * Generic aliases for collections.abc ABCs and few additional protocols. * Special types: NewType, NamedTuple, TypedDict. * Wrapper submodules for re and io related types. )abstractmethodABCMetaN)WrapperDescriptorTypeMethodWrapperTypeMethodDescriptorType GenericAlias)M AnnotatedAnyCallableClassVarFinal ForwardRefGenericLiteralOptionalProtocolTupleTypeTypeVarUnion AbstractSet ByteString ContainerContextManagerHashable ItemsViewIterableIteratorKeysViewMapping MappingViewMutableMappingMutableSequence MutableSetSequenceSized ValuesView Awaitable AsyncIterator AsyncIterable Coroutine CollectionAsyncGeneratorAsyncContextManager Reversible SupportsAbs SupportsBytesSupportsComplex SupportsFloat SupportsIndex SupportsInt SupportsRoundChainMapCounterDequeDict DefaultDictList OrderedDictSet FrozenSet NamedTuple TypedDict GeneratorBinaryIOIOMatchPatternTextIOAnyStrcastfinalget_args get_originget_type_hintsNewType no_type_checkno_type_check_decoratorNoReturnoverloadruntime_checkableText TYPE_CHECKINGFallow_special_formscCs,|durtdSt|tr(t|||dS|S)z=For converting None to type(None), and strings to ForwardRef.N)moduleis_class)type isinstancestrr )argrWrVr]/usr/lib64/python3.9/typing.py _type_converts  r_TcCsttf}|s$|tf7}|r$|tf7}t|||d}t|trT|j|vrTt|d|t t tfvrf|St|t s||ttfvrtd|dt|t t tfr|St|st|d|dd|S)aCheck that the argument is a type, and return it (internal helper). As a special case, accept None and return type(None) instead. Also wrap strings into ForwardRef instances. Consider several corner cases, for example plain special forms like Union are not valid, while Union[int, str] is OK, etc. The msg argument is a human-readable error message, e.g:: "Union[arg, ...]: arg should be a type." We append the repr() of the actual value (truncated to 100 chars). )rWrVz is not valid as type argumentzPlain z Got z.100.)rrr r r_rZ _GenericAlias __origin__ TypeErrorr rP _SpecialFormrYrr callable)r\msg is_argumentrWrVinvalid_generic_formsr]r]r^ _type_checks&    ricCsft|tjrt|St|tr@|jdkr.|jS|jd|jS|durLdSt|tjr^|jSt|S)a;Return the repr() of an object, special-casing types (internal helper). If obj is a type, we return a shorter version than the default type.__repr__, based on the module and qualified name, which is typically enough to uniquely identify a type. For everything else, we fall back on repr(obj). builtinsr`.z...) rZtypesrreprrY __module__ __qualname__ FunctionType__name__)objr]r]r^ _type_reprs    rrcsZg|D]H}t|tr(|vr(|t|ttfrfdd|jDqtS)zCollect all type variable contained in types in order of first appearance (lexicographic order). For example:: _collect_type_vars((T, List[S, T])) == (T, S) csg|]}|vr|qSr]r].0ttvarsr]r^ z&_collect_type_vars..)rZrappendrarextend__parameters__tuple)rkrur]rvr^_collect_type_varss r~c CsR|st|dt|}||krNtd||kr2dndd|d|d|dS) zCheck correct count for parameters of a generic cls (internal helper). This gives a nice error message in case of count mismatch. z is not a generic classzToo manyfewz parameters for z ; actual z , expected N)rclen)cls parameterselenalenr]r]r^_check_genericsrcCsVt|}t|t|krRg}|D] }||vr ||||q |}|rRJ||SN)setrrzremove)params all_params new_paramsrur]r]r^ _deduplicates   rcCsrg}|D]\}t|tr$||jqt|trZt|dkrZ|dturZ||ddq||qtt|S)zyAn internal helper for Union creation and substitution: flatten Unions among parameters, then remove duplicates. rN) rZ_UnionGenericAliasr{__args__r}rrrzrrrpr]r]r^_remove_dups_flattens " rcCs8g}|D]&}t|tr$||jq||qt|S)zJAn internal helper for Literal creation: flatten Literals among parameters)rZ_LiteralGenericAliasr{rrzr}rr]r]r^_flatten_literal_paramss   rtypedcs fdd}|dur||S|S)zInternal wrapper caching __getitem__ of generic types with a fallback to original function for non-hashable arguments. cs8tjdtjtfdd}|S)Nrcs2z|i|WSty"Yn0|i|Srrcargskwdscachedfuncr]r^inners  z+_tp_cache..decorator..inner) functools lru_cache _cleanupsrz cache_clearwraps)rrrrr^ decorator s  z_tp_cache..decoratorNr])rrrr]rr^ _tp_caches rcstt|tr|St|ttfrptfdd|jD}||jkrP|St|trft|j|S||S|S)zEvaluate all forward references in the given type t. For use of globalns and localns see the docstring for get_type_hints(). recursive_guard is used to prevent infinite recursion with a recursive ForwardRef. c3s|]}t|VqdSr) _eval_typertaglobalnslocalnsrecursive_guardr]r^ &ryz_eval_type..) rZr _evaluaterarr}rrb copy_with)rurrrev_argsr]rr^rs     rc@seZdZdZdZddZdS)_FinalzMixin to prohibit subclassing) __weakref__cOsd|vrtddS)N_rootz&Cannot subclass special typing classesrselfrrr]r]r^__init_subclass__5sz_Final.__init_subclass__N)rprmrn__doc__ __slots__rr]r]r]r^r0src@s$eZdZdZdZddZddZdS) _Immutablez3Mixin to indicate that object should not be copied.r]cCs|Srr]rr]r]r^__copy__=sz_Immutable.__copy__cCs|Srr])rmemor]r]r^ __deepcopy__@sz_Immutable.__deepcopy__N)rprmrnrrrrr]r]r]r^r9src@sTeZdZdZddZddZddZdd Zd d Zd d Z ddZ e ddZ dS)rd)_namer_getitemcCs||_|j|_|j|_dSr)rrprr)rgetitemr]r]r^__init__Isz_SpecialForm.__init__cCstd|dS)NzCannot subclass r)rbasesr]r]r^__mro_entries__Nsz_SpecialForm.__mro_entries__cCs d|jSNtyping.rrr]r]r^__repr__Qsz_SpecialForm.__repr__cCs|jSrrrr]r]r^ __reduce__Tsz_SpecialForm.__reduce__cOstd|dS)NzCannot instantiate rrr]r]r^__call__Wsz_SpecialForm.__call__cCst|ddS)Nz! cannot be used with isinstance()rrrqr]r]r^__instancecheck__Zsz_SpecialForm.__instancecheck__cCst|ddS)Nz! cannot be used with issubclass()rrrr]r]r^__subclasscheck__]sz_SpecialForm.__subclasscheck__cCs |||Sr)rrrr]r]r^ __getitem__`sz_SpecialForm.__getitem__N) rprmrnrrrrrrrrrrr]r]r]r^rdFsrd)rc@seZdZddZdS)_LiteralSpecialFormcCs"t|ts|f}|j|g|RSr)rZr}rrr]r]r^rfs z_LiteralSpecialForm.__getitem__N)rprmrnrr]r]r]r^resrcCst|ddS)a`Special type indicating an unconstrained type. - Any is compatible with every type. - Any assumed to have all methods. - All values assumed to be instances of Any. Note that all the above statements are true from the point of view of static type checkers. At runtime, Any should not be used with instance or class checks.  is not subscriptableNrrr]r]r^r ls r cCst|ddS)aSpecial type indicating functions that never return. Example:: from typing import NoReturn def stop() -> NoReturn: raise Exception('no way') This type is invalid in other positions, e.g., ``List[NoReturn]`` will fail in static type checkers. rNrrr]r]r^rPzs rPcCst||d}t||fS)a3Special type construct to mark class variables. An annotation wrapped in ClassVar indicates that a given attribute is intended to be used as a class variable and should not be set on instances of that class. Usage:: class Starship: stats: ClassVar[Dict[str, int]] = {} # class variable damage: int = 10 # instance variable ClassVar accepts only types and cannot be further subscribed. Note that ClassVar is not a class itself, and should not be used with isinstance() or issubclass().  accepts only single type.rirarritemr]r]r^r sr cCst||d}t||fS)aSpecial typing construct to indicate final names to type checkers. A final name cannot be re-assigned or overridden in a subclass. For example: MAX_SIZE: Final = 9000 MAX_SIZE += 1 # Error reported by type checker class Connection: TIMEOUT: Final[int] = 10 class FastConnector(Connection): TIMEOUT = 1 # Error reported by type checker There is no runtime checking of these properties. rrrr]r]r^r sr cs`|dkrtdt|ts |f}dtfdd|D}t|}t|dkrV|dSt||S)a'Union type; Union[X, Y] means either X or Y. To define a union, use e.g. Union[int, str]. Details: - The arguments must be types and there must be at least one. - None as an argument is a special case and is replaced by type(None). - Unions of unions are flattened, e.g.:: Union[Union[int, str], float] == Union[int, str, float] - Unions of a single argument vanish, e.g.:: Union[int] == int # The constructor actually returns int - Redundant arguments are skipped, e.g.:: Union[int, str, int] == Union[int, str] - When comparing unions, the argument order is ignored, e.g.:: Union[int, str] == Union[str, int] - You cannot subclass or instantiate a union. - You can use Optional[X] as a shorthand for Union[X, None]. r]z Cannot take a Union of no types.z)Union[arg, ...]: each arg must be a type.c3s|]}t|VqdSrrirtrrfr]r^rryzUnion..rr)rcrZr}rrrrr]rr^rs  rcCs t||d}t|tdfS)zEOptional type. Optional[X] is equivalent to Union[X, None]. z requires a single type.N)rirrY)rrr\r]r]r^rsrcGsHt|}z"tddttt|D}Wnty<Yn0t||S)aSpecial typing form to define literal types (a.k.a. value types). This form can be used to indicate to type checkers that the corresponding variable or function parameter has a value equivalent to the provided literal (or one of several literals): def validate_simple(data: Any) -> Literal[True]: # always returns True ... MODE = Literal['r', 'rb', 'w', 'wb'] def open_helper(file: str, mode: MODE) -> str: ... open_helper('/some/path', 'r') # Passes type check open_helper('/other/path', 'typo') # Error in type checker Literal[...] cannot be subclassed. At runtime, an arbitrary value is allowed as type argument to Literal[...], but type checkers may impose restrictions. css|]\}}|VqdSrr])rtr_r]r]r^rryzLiteral..)rr}rlist_value_and_type_iterrcrrr]r]r^rs " rc@sDeZdZdZdZdddddZd d Zd d Zd dZddZ dS)r z-Internal wrapper to hold a forward reference.)__forward_arg____forward_code____forward_evaluated____forward_value____forward_is_argument____forward_is_class____forward_module__TNF)rXcCsxt|tstd|zt|dd}Wn tyHtd|Yn0||_||_d|_d|_||_ ||_ ||_ dS)Nz*Forward reference must be a string -- got zevalz/Forward reference must be an expression -- got F) rZr[rccompile SyntaxErrorrrrrrrr)rr\rgrWrXcoder]r]r^r s  zForwardRef.__init__cCs|j|vr|S|jr||ur|dur6|dur6i}}n|durD|}n |durP|}|jdurrttj|jdd|}tt|j ||d|j |j d}t |||||jhB|_ d|_|j S)N__dict__z*Forward references must evaluate to types.)rgrVT)rrrgetattrsysmodulesgetrirrrrrr)rrrrtype_r]r]r^rs0    zForwardRef._evaluatecCsJt|tstS|jr2|jr2|j|jko0|j|jkS|j|jkoH|j|jkSr)rZr NotImplementedrrrrrotherr]r]r^__eq__5s      zForwardRef.__eq__cCst|j|jfSr)hashrrrr]r]r^__hash__>szForwardRef.__hash__cCsd|jdS)Nz ForwardRef())rrr]r]r^rAszForwardRef.__repr__)TN) rprmrnrrrrrrrr]r]r]r^r s r c@s6eZdZdZdZddddddZdd Zd d ZdS) raType variable. Usage:: T = TypeVar('T') # Can be anything A = TypeVar('A', str, bytes) # Must be str or bytes Type variables exist primarily for the benefit of static type checkers. They serve as the parameters for generic types as well as for generic function definitions. See class Generic for more information on generic types. Generic functions work as follows: def repeat(x: T, n: int) -> List[T]: '''Return a list containing n references to x.''' return [x]*n def longest(x: A, y: A) -> A: '''Return the longest of two strings.''' return x if len(x) >= len(y) else y The latter example's signature is essentially the overloading of (str, str) -> str and (bytes, bytes) -> bytes. Also note that if the arguments are instances of some subclass of str, the return type is still plain str. At runtime, isinstance(x, T) and issubclass(C, T) will raise TypeError. Type variables defined with covariant=True or contravariant=True can be used to declare covariant or contravariant generic types. See PEP 484 for more details. By default generic types are invariant in all type variables. Type variables can be introspected. e.g.: T.__name__ == 'T' T.__constraints__ == () T.__covariant__ == False T.__contravariant__ = False A.__constraints__ == (str, bytes) Note that only type variables defined in global scope can be pickled. )rp __bound____constraints__ __covariant____contravariant__rNF)bound covariant contravariantc s||_|r|rtdt||_t||_|r>|dur>td|rVt|dkrVtddtfdd|D|_|rt |d|_ nd|_ zt dj d d }Wnttfyd}Yn0|d kr||_dS) Nz"Bivariant types are not supported.z-Constraints cannot be combined with bound=...rz"A single constraint is not allowedz:TypeVar(name, constraint, ...): constraints must be types.c3s|]}t|VqdSrrrsrr]r^rryz#TypeVar.__init__..zBound must be a type.rp__main__typing)rp ValueErrorboolrrrcrr}rrirr _getframe f_globalsrAttributeErrorrm)rnamerrr constraintsdef_modr]rr^rts(    zTypeVar.__init__cCs&|jr d}n|jrd}nd}||jS)N+-~)rrrp)rprefixr]r]r^rs zTypeVar.__repr__cCs|jSr)rprr]r]r^rszTypeVar.__reduce__)rprmrnrrrrrr]r]r]r^rEs+  rcCs|do|dS)N__) startswithendswith)attrr]r]r^ _is_dundersrcsXeZdZdZdddddZddZd d Zd d Zfd dZddZ ddZ Z S)_BaseGenericAliasaThe central part of internal API. This represents a generic version of type 'origin' with type arguments 'params'. There are two kind of these aliases: user defined and special. The special ones are wrappers around builtin collections and ABCs in collections.abc. These must have 'name' always set. If 'inst' is False, then the alias can't be instantiated, this is used by e.g. typing.List and typing.Dict. TNinstrcCs||_||_||_d|_dSr)_instrrbr)roriginrrr]r]r^rsz_BaseGenericAlias.__init__cOsT|js"td|jd|jjd|j|i|}z ||_WntyNYn0|S)NzType z cannot be instantiated; use z () instead)rrcrrbrp__orig_class__r)rrkwargsresultr]r]r^rs    z_BaseGenericAlias.__call__cCsdg}|j|vr||j||}||ddD]}t|tsLt|tr4q\q4|tt|S)Nr)rbrzindexrZr issubclassrr})rrresibr]r]r^rs    z!_BaseGenericAlias.__mro_entries__cCs*d|jvrt|st|j|St|dS)Nrb)rrrrbr)rr r]r]r^ __getattr__s z_BaseGenericAlias.__getattr__cs2t|s|dvr t||nt|j||dS)N)rr_nparams)rsuper __setattr__setattrrb)rr val __class__r]r^rsz_BaseGenericAlias.__setattr__cCs|t|Sr)rrYrr]r]r^rsz#_BaseGenericAlias.__instancecheck__cCs tddS)NzBSubscripted generics cannot be used with class and instance checksrrr]r]r^rsz#_BaseGenericAlias.__subclasscheck__) rprmrnrrrrrrrr __classcell__r]r]r"r^rs   rcsdeZdZdddfdd ZddZdd Zed d Zd d ZddZ ddZ fddZ Z S)raTNrcsPtj|||dt|ts"|f}tdd|D|_t||_|sL|j|_dS)Nrcss*|]"}|turdn|turdn|VqdS).r]N)_TypingEllipsis _TypingEmptyrr]r]r^rs  z)_GenericAlias.__init__..)rrrZr}rr~r|rm)rrrrrr"r]r^rs   z_GenericAlias.__init__cCs&t|tstS|j|jko$|j|jkSr)rZrarrbrrr]r]r^rs    z_GenericAlias.__eq__cCst|j|jfSr)rrbrrr]r]r^rsz_GenericAlias.__hash__cs|jttfvrtd|t|ts,|f}dtfdd|D}t||t|jt t |j|g}|j D]X}t|t r|}n6t|t tfr|j}|rtfdd|D}||}||qr|t|S)Nz%Cannot subscript already-subscripted *Parameters to generic types must be types.c3s|]}t|VqdSrrrrr]r^rryz,_GenericAlias.__getitem__..c3s|]}|VqdSrr])rtx)substr]r^r ry)rbrrrcrZr}rrr|dictziprrrarrzr)rrnew_argsr\ subparamssubargsr])rfr)r^rs&     z_GenericAlias.__getitem__cCs|j|j||j|jdSN)rr)r#rbrrrrr]r]r^rsz_GenericAlias.copy_withcCsB|jrd|j}n t|j}ddd|jD}|d|dS)Nr, cSsg|] }t|qSr]rrrr]r]r^rxryz*_GenericAlias.__repr__..[])rrrrbjoinr)rrrr]r]r^rs   z_GenericAlias.__repr__cCsR|jrt|j}n|j}t|j}t|dkrDt|dtsD|\}tj||ffSNrr) rglobalsrbr}rrrZoperatorr)rrrr]r]r^rs z_GenericAlias.__reduce__csh|jrt|S|jtur`t|vr(dS||}||ddD]}t|trB||urBdSqB|jfS)Nr]r) rrrrbrrrrZr)rrrrr"r]r^r$s   z_GenericAlias.__mro_entries__) rprmrnrrrrrrrrrr$r]r]r"r^ras   racsTeZdZdddfdd ZeddZdd Zd d Zfd d ZddZ Z S)_SpecialGenericAliasTNrcs^|dur|j}tj|||d||_|jdkrBd|jd|_nd|jd|jd|_dS)NrrjzA generic version of r`)rprrrrmrnr)rrnparamsrrr"r]r^r6s z_SpecialGenericAlias.__init__csBt|ts|f}dtfdd|D}t|||j||S)Nr'c3s|]}t|VqdSrrrrr]r^rEryz3_SpecialGenericAlias.__getitem__..)rZr}rrrr0r]rr^r@s  z _SpecialGenericAlias.__getitem__cCst|j||j|jdSr/)rarbrrr0r]r]r^rIsz_SpecialGenericAlias.copy_withcCs d|jSrrrr]r]r^rMsz_SpecialGenericAlias.__repr__cs:t|trt|j|jSt|ts.t||jSt|Sr)rZr9rrbrarrrr"r]r^rPs    z&_SpecialGenericAlias.__subclasscheck__cCs|jSrrrr]r]r^rWsz_SpecialGenericAlias.__reduce__) rprmrnrrrrrrrr$r]r]r"r^r95s   r9cs$eZdZfddZddZZS)_CallableGenericAliascsj|jdksJt|jdkr4|jdtur4tSdddd|jddDd t|jdd S) Nr rztyping.Callable[[r1cSsg|] }t|qSr]r2rr]r]r^rxaryz2_CallableGenericAlias.__repr__..z], r4)rrrEllipsisrrr5rrrr"r]r^r\s  z_CallableGenericAlias.__repr__cCsD|j}t|dkr|ddus6t|dd|df}tjt|ffS)Nr<r.r=)rrrr8rr rrr]r]r^rdsz _CallableGenericAlias.__reduce__)rprmrnrrr$r]r]r"r^r;[s r;c@s(eZdZddZddZeddZdS) _CallableTypecCst|j||j|jdSr/)r;rbrrr0r]r]r^rlsz_CallableType.copy_withcCsPt|trt|dkrtd|\}}t|tr>t||f}n||f}||S)Nr<z6Callable must be used as Callable[[arg, ...], result].)rZr}rrcr__getitem_inner__)rrrrr]r]r^rps z_CallableType.__getitem__cCsb|\}}d}t||}|tur,|t|fSt|ts<|f}tdd|D}||f}||S)Nz.Callable[args, result]: result must be a type.css|]}t|VqdSr)r_)rtr\r]r]r^rryz2_CallableType.__getitem_inner__..)rir>rr%rZr})rrrrrfr]r]r^rA~s   z_CallableType.__getitem_inner__N)rprmrnrrrrAr]r]r]r^r@ksr@c@seZdZeddZdS) _TupleTypecs|dkr|tfSt|ts$|f}t|dkr\|ddur\dt|d}||tfSdtfdd |D}||S) Nr]r<r.z Tuple[t, ...]: t must be a type.rz*Tuple[t0, t1, ...]: each t must be a type.c3s|]}t|VqdSrrrrr]r^rryz)_TupleType.__getitem__..)rr&rZr}rrir%)rrrr]rr^rs  z_TupleType.__getitem__N)rprmrnrrr]r]r]r^rBsrBcs4eZdZddZddZddZfddZZS) rcCst|Sr)rr0r]r]r^rsz_UnionGenericAlias.copy_withcCs"t|tstSt|jt|jkSr)rZrrrrrr]r]r^rs z_UnionGenericAlias.__eq__cCstt|jSr)r frozensetrrr]r]r^rsz_UnionGenericAlias.__hash__csd|j}t|dkrZ|dtdur6dt|ddS|dtdurZdt|ddStS)Nr<rztyping.Optional[rr4)rrrYrrrrr?r"r]r^rs z_UnionGenericAlias.__repr__)rprmrnrrrrr$r]r]r"r^rsrcCsdd|DS)Ncss|]}|t|fVqdSr)rYrr]r]r^rryz'_value_and_type_iter..r])rr]r]r^rsrc@seZdZddZddZdS)rcCs*t|tstStt|jtt|jkSr)rZrrrrrrr]r]r^rs z_LiteralGenericAlias.__eq__cCsttt|jSr)rrCrrrr]r]r^rsz_LiteralGenericAlias.__hash__N)rprmrnrrr]r]r]r^rsrcs4eZdZdZdZdZeddZfddZZ S)raCAbstract base class for generic types. A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as:: class Mapping(Generic[KT, VT]): def __getitem__(self, key: KT) -> VT: ... # Etc. This class can then be used as follows:: def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT: try: return mapping[key] except KeyError: return default r]Fcst|ts|f}|s.|tur.td|jddtfdd|D}|ttfvrtdd|Dsxtd|jdt t |t |krtd|jd nt ||t |j t ||S) NzParameter list to z[...] cannot be emptyr'c3s|]}t|VqdSrrrrr]r^rryz,Generic.__class_getitem__..css|]}t|tVqdSr)rZrrr]r]r^rryzParameters to z [...] must all be type variablesz[...] must all be unique)rZr}rrcrnrrallrprrrr|ra)rrr]rr^__class_getitem__s&      zGeneric.__class_getitem__c stj|i|g}d|jvr,t|jv}nt|jvo>|jdk}|rLtdd|jvrt|j}d}|jD].}t |t rl|j turl|durtd|j }ql|durt |}t ||ksdfdd|D}ddd|D} td |d | d |}t||_ dS) N__orig_bases__rz!Cannot inherit from plain Genericz0Cannot inherit from Generic[...] multiple types.r1c3s|]}|vrt|VqdSrr[rsgvarsetr]r^r ryz,Generic.__init_subclass__..css|]}t|VqdSrrG)rtgr]r]r^r ryzSome type variables (z) are not listed in Generic[r4)rrrrrF __bases__rprcr~rZrarbr|rr5r}) rrrrwerrorgvarsbasetvarsets_varss_argsr"rHr^rs<          zGeneric.__init_subclass__) rprmrnrr _is_protocolrrErr$r]r]r"r^rs  rc@seZdZdZdS)r&zInternal placeholder for () or []. Used by TupleMeta and CallableMeta to allow empty list/tuple in specific places, without allowing them to sneak in where prohibited. Nrprmrnrr]r]r]r^r&sr&c@seZdZdZdS)r%z(Internal placeholder for ... (ellipsis).NrSr]r]r]r^r%sr%)r|rFrrR_is_runtime_protocol) __abstractmethods____annotations__rrrrm__new__r__subclasshook__rrE_MutableMapping__markercCsrt}|jddD]X}|jdvr$qt|di}t|jt|D] }|dsJ|tvrJ| |qJq|S)zCollect protocol members from a protocol class objects. This includes names actually defined in the class dictionary, as well as names that appear in annotations. Special names (above) are skipped. Nr=)rrrV_abc_) r__mro__rprrrkeysr EXCLUDED_ATTRIBUTESadd)rattrsrN annotationsr r]r]r^_get_protocol_attrs)s  racstfddtDS)Nc3s|]}tt|dVqdSr)rerrtr rr]r^r<ryz,_is_callable_members_only..)rDrarcr]rcr^_is_callable_members_only:srdcOstt|}|jrtd|jtur$dS|jD]$}|jdt}|tur*||_qXq*tj|_|j|g|Ri|dS)Nz Protocols cannot be instantiatedr) rYrRrcr_no_init_or_replace_initr[rrobject)rrrrrNinitr]r]r^re?s  rec Cs4ztdjddvWSttfy.YdS0dS)zAllow instance and class checks for special stdlib modules. The abc and functools modules indiscriminately call isinstance() and issubclass() on the whole MRO of a user class, which may contain protocols. rp)abcrTN)rrrrrr]r]r]r^_allow_reckless_class_cheks]srj) r r'rrr)rr%rr+r.AbstractContextManagerAbstractAsyncContextManager)zcollections.abc contextlibcseZdZfddZZS) _ProtocolMetacsVtddrtr$tjr$dSjrJtfddtDrJdStS)NrRFTc3s8|]0}t|o.tt|d p.t|duVqdSr)hasattrrerrbrinstancer]r^r}s z2_ProtocolMeta.__instancecheck__..) rrdrr#rRrDrarrrpr"rpr^rus  z_ProtocolMeta.__instancecheck__)rprmrnrr$r]r]r"r^rnrsrncs,eZdZdZdZdZdZfddZZS)raZBase class for protocol classes. Protocol classes are defined as:: class Proto(Protocol): def meth(self) -> int: ... Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing), for example:: class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:: class GenProto(Protocol[T]): def meth(self) -> T: ... r]TFcstj|i|jdds6tddjD_fdd}djvrR|_js\dSjD]F}|tt fvsb|j t vr|j t |j vsbt |t r|jsbtd|qbt_dS) NrRFcss|]}|tuVqdSr)r)rtrr]r]r^rryz-Protocol.__init_subclass__..csjddstStdds0tr(tStdtsJtrBtStdt|ts\tdt D]v}|j D]b}||jvr|j|durtSqdt|di}t|t j j rn||vrnt|trn|jrnqdqntSqddS) NrRFrTzLInstance and class checks can only be used with @runtime_checkable protocolsz._proto_hookrXz7Protocols can only inherit from other protocols, got %r)rrrranyrKrRrXrfrrm_PROTO_WHITELISTrprrcrer)rrrrsrNr"rcr^rs, &   zProtocol.__init_subclass__) rprmrnrrrRrTrr$r]r]r"r^rs r) metaclasscsHeZdZdZfddZddZddZdd Zd d Zd d Z Z S)_AnnotatedAliasa7Runtime representation of an annotated type. At its core 'Annotated[t, dec1, dec2, ...]' is an alias for the type 't' with extra annotations. The alias behaves like a normal typing alias, instantiating is the same as instantiating the underlying type, binding it to types is also the same. cs2t|tr|j|}|j}t||||_dSr)rZrw __metadata__rbrr)rrmetadatar"r]r^rs   z_AnnotatedAlias.__init__cCs$t|dksJ|d}t||jSr6)rrwrx)rrnew_typer]r]r^rsz_AnnotatedAlias.copy_withcCs$dt|jddd|jDS)Nztyping.Annotated[{}, {}]r1css|]}t|VqdSr)rlrr]r]r^rryz+_AnnotatedAlias.__repr__..)formatrrrbr5rxrr]r]r^rsz_AnnotatedAlias.__repr__cCstjt|jf|jffSr)r8rrrbrxrr]r]r^rsz_AnnotatedAlias.__reduce__cCs&t|tstS|j|jko$|j|jkSr)rZrwrrbrxrr]r]r^rs    z_AnnotatedAlias.__eq__cCst|j|jfSr)rrbrxrr]r]r^r sz_AnnotatedAlias.__hash__) rprmrnrrrrrrrr$r]r]r"r^rws rwc@s0eZdZdZdZddZeddZddZd S) raAdd context specific metadata to a type. Example: Annotated[int, runtime_check.Unsigned] indicates to the hypothetical runtime_check module that this type is an unsigned int. Every other consumer of this type can ignore this metadata and treat this type as int. The first argument to Annotated must be a valid type. Details: - It's an error to call `Annotated` with less than two arguments. - Nested Annotated are flattened:: Annotated[Annotated[T, Ann1, Ann2], Ann3] == Annotated[T, Ann1, Ann2, Ann3] - Instantiating an annotated type is equivalent to instantiating the underlying type:: Annotated[C, Ann1](5) == C(5) - Annotated can be used as a generic type alias:: Optimized = Annotated[T, runtime.Optimize()] Optimized[int] == Annotated[int, runtime.Optimize()] OptimizedList = Annotated[List[T], runtime.Optimize()] OptimizedList[int] == Annotated[List[int], runtime.Optimize()] r]cOs tddS)Nz&Type Annotated cannot be instantiated.rrrrr]r]r^rW2szAnnotated.__new__cCsNt|trt|dkrtdd}t|d|dd}t|dd}t||S)Nr<zUAnnotated[...] should be used with at least two arguments (a type and an annotation).z$Annotated[t, ...]: t must be a type.rTrUr)rZr}rrcrirw)rrrfrryr]r]r^rE5s zAnnotated.__class_getitem__cOstd|jdS)NzCannot subclass {}.Annotated)rcr{rmr|r]r]r^r@s zAnnotated.__init_subclass__N) rprmrnrrrWrrErr]r]r]r^rs  rcCs&t|tr|jstd|d|_|S)a9Mark a protocol class as a runtime protocol. Such protocol can be used with isinstance() and issubclass(). Raise TypeError if applied to a non-protocol class. This allows a simple-minded structural check very similar to one trick ponies in collections.abc such as Iterable. For example:: @runtime_checkable class Closable(Protocol): def close(self): ... assert isinstance(open('/some/file'), Closable) Warning: this will check only the presence of the required methods, not their type signatures! zB@runtime_checkable can be only applied to protocol classes, got %rT)rrrRrcrTrcr]r]r^rRFs rRcCs|S)zCast a value to a type. This returns the value unchanged. To the type checker this signals that the return value has the designated type, but at runtime we intentionally don't check anything (we want this to be as fast as possible). r])typr!r]r]r^rH_srHc Csz |j}Wnty iYS0|j}|j}|d|}|jpBd}|j}|rVt|ni}|t|}t||d|D]\}} ||vsJ| ||<qx|S)z:Internal helper to extract the default arguments, by name.Nr]) __code__r co_argcount co_varnames __defaults____kwdefaults__r*rr+) rr pos_count arg_namesdefaults kwdefaultsr pos_offsetrvaluer]r]r^ _get_defaultsjs        rc Cst|ddriSt|tri}t|jD]|}|durDtj|jj}n|}|j di}| D]D\}} | durvtd} t| t rt | ddd} t | ||} | ||<q^q(|r|Sdd| DS|durt|tjr|j}n"|} t| d r| j} qt| d i}|dur|}n|dur|}t|dd}|durRt|trDiStd |t|} t|}| D]t\}} | durtd} t| t rt | t|tj dd} t | ||} || vr| |durt| } | ||<qj|r|Sd d| DS) aReturn type hints for an object. This is often the same as obj.__annotations__, but it handles forward references encoded as string literals, adds Optional[t] if a default value equal to None is set and recursively replaces all 'Annotated[T, ...]' with 'T' (unless 'include_extras=True'). The argument may be a module, class, method, or function. The annotations are returned as a dictionary. For classes, annotations include also inherited members. TypeError is raised if the argument is not of a type that can contain annotations, and an empty dictionary is returned if no annotations are present. BEWARE -- the behavior of globalns and localns is counterintuitive (unless you are familiar with how eval() and exec() work). The search order is locals first, then globals. - If no dict arguments are passed, an attempt is made to use the globals from obj (or the respective module's globals for classes), and these are also used as the locals. If the object does not appear to have globals, an empty dictionary is used. - If one dict argument is passed, it is used for both globals and locals. - If two dict arguments are passed, they specify globals and locals, respectively. __no_type_check__NrVFT)rgrXcSsi|]\}}|t|qSr]_strip_annotationsrtkrur]r]r^ ryz"get_type_hints.. __wrapped__ __globals__z1{!r} is not a module, class, method, or function.cSsi|]\}}|t|qSr]rrr]r]r^rry)rrZrYreversedr[rrrmrritemsr[r rrk ModuleTyperor_allowed_typesrcr{rr*r) rqrrinclude_extrashintsrN base_globalsannrrnsobjrr]r]r^rLsf                   rLcCst|trt|jSt|trJtdd|jD}||jkr@|S||St|trtdd|jD}||jkrv|St|j|S|S)z.Strips the annotations from a given type. css|]}t|VqdSrrrr]r]r^rryz%_strip_annotations..css|]}t|VqdSrrrr]r]r^rry) rZrwrrbrar}rrr)ru stripped_argsr]r]r^rs        rcCs2t|trtSt|ttfr"|jS|tur.tSdS)aGet the unsubscripted version of a type. This supports generic types, Callable, Tuple, Union, Literal, Final, ClassVar and Annotated. Return None for unsupported types. Examples:: get_origin(Literal[42]) is Literal get_origin(int) is None get_origin(ClassVar[int]) is ClassVar get_origin(Generic) is Generic get_origin(Generic[T]) is Generic get_origin(Union[T, int]) is Union get_origin(List[Tuple[T, T]][int]) == list N)rZrwrrrrbr)tpr]r]r^rKs rKcCsft|tr|jf|jSt|ttfrb|j}|jtjj ur^|dt ur^t |dd|df}|SdS)aGet type arguments with all substitutions performed. For unions, basic simplifications used by Union constructor are performed. Examples:: get_args(Dict[str, int]) == (str, int) get_args(int) == () get_args(Union[int, Union[T, int], str][int]) == (int, str) get_args(Union[int, Tuple[T, int]][str]) == (int, Tuple[str, int]) get_args(Callable[[], T][int]) == ([], int) rNr=r]) rZrwrbrxrarrrrrir r>r)rrr]r]r^rJ s rJcCst|trt|j}|jD]"\}}||j|fvr||q|D](}t|tj r`d|_ t|trJt |qJz d|_ Wnt yYn0|S)aIDecorator to indicate that annotations are not type hints. The argument must be a class or function; if it is a class, it applies recursively to all methods and classes defined in that class (but not to methods defined in its superclasses or subclasses). This mutates the function(s) or class(es) in place. T) rZrYrcopyrrKpopvaluesrkrorrNrc)r\ arg_attrsr r!rqr]r]r^rNs         rNcstfdd}|S)zDecorator to give another decorator the @no_type_check effect. This wraps the decorator with something that wraps the decorated function in @no_type_check. cs|i|}t|}|Sr)rN)rrrrr]r^wrapped_decorator?sz2no_type_check_decorator..wrapped_decorator)rr)rrr]rr^rO8srOcOs tddS)z*Helper for @overload to raise when called.zYou should not call an overloaded function. A series of @overload-decorated functions outside a stub module should always be followed by an implementation that is not @overload-ed.N)NotImplementedErrorrr]r]r^_overload_dummyHsrcCstS)a Decorator for overloaded functions/methods. In a stub file, place two or more stub definitions for the same function in a row, each decorated with @overload. For example: @overload def utf8(value: None) -> None: ... @overload def utf8(value: bytes) -> bytes: ... @overload def utf8(value: str) -> bytes: ... In a non-stub file (i.e. a regular .py file), do the same but follow it with an implementation. The implementation should *not* be decorated with @overload. For example: @overload def utf8(value: None) -> None: ... @overload def utf8(value: bytes) -> bytes: ... @overload def utf8(value: str) -> bytes: ... def utf8(value): # implementation goes here )r)rr]r]r^rQQsrQcCs|S)aVA decorator to indicate final methods and final classes. Use this decorator to indicate to type checkers that the decorated method cannot be overridden, and decorated class cannot be subclassed. For example: class Base: @final def done(self) -> None: ... class Sub(Base): def done(self) -> None: # Error reported by type checker ... @final class Leaf: ... class Other(Leaf): # Error reported by type checker ... There is no runtime checking of these properties. r])fr]r]r^rInsrITKTVTT_co)rV_coVT_coT_contra)rCT_co)rrrGrrhr<aCallable type; Callable[[int], str] is a function of (int) -> str. The subscription syntax must always be used with exactly two values: the argument list and the return type. The argument list must be a list of types or ellipsis; the return type must be a single type. There is no syntax to indicate optional or keyword arguments, such function types are rarely used as callback types. r)rr=rra@Tuple type; Tuple[X, Y] is the cross-product type of X and Y. Example: Tuple[T1, T2] is a tuple of two elements corresponding to type variables T1 and T2. Tuple[int, float, str] is a tuple of an int, a float and a string. To specify a variable-length tuple of homogeneous type, use Tuple[T, ...]. r;r8r=r>rr-r9r:raA special construct usable to annotate class objects. For example, suppose we have the following classes:: class User: ... # Abstract base for User classes class BasicUser(User): ... class ProUser(User): ... class TeamUser(User): ... And a function that takes a class argument that's a subclass of User and returns an instance of the corresponding class:: U = TypeVar('U', bound=User) def new_user(user_class: Type[U]) -> U: user = user_class() # (Here we could write the user object to a database) return user joe = new_user(BasicUser) At this point the type checker knows that joe has type BasicUser. c@s&eZdZdZdZeedddZdS)r4z(An ABC with one abstract method __int__.r]returncCsdSrr]rr]r]r^__int__szSupportsInt.__int__N)rprmrnrrrintrr]r]r]r^r4sr4c@s&eZdZdZdZeedddZdS)r2z*An ABC with one abstract method __float__.r]rcCsdSrr]rr]r]r^ __float__szSupportsFloat.__float__N)rprmrnrrrfloatrr]r]r]r^r2sr2c@s&eZdZdZdZeedddZdS)r1z,An ABC with one abstract method __complex__.r]rcCsdSrr]rr]r]r^ __complex__ szSupportsComplex.__complex__N)rprmrnrrrcomplexrr]r]r]r^r1sr1c@s&eZdZdZdZeedddZdS)r0z*An ABC with one abstract method __bytes__.r]rcCsdSrr]rr]r]r^ __bytes__szSupportsBytes.__bytes__N)rprmrnrrrbytesrr]r]r]r^r0sr0c@s&eZdZdZdZeedddZdS)r3z*An ABC with one abstract method __index__.r]rcCsdSrr]rr]r]r^ __index__szSupportsIndex.__index__N)rprmrnrrrrrr]r]r]r^r3sr3c@s&eZdZdZdZeedddZdS)r/zMAn ABC with one abstract method __abs__ that is covariant in its return type.r]rcCsdSrr]rr]r]r^__abs__'szSupportsAbs.__abs__N)rprmrnrrrrrr]r]r]r^r/"sr/c@s*eZdZdZdZedeedddZdS) r5zOAn ABC with one abstract method __round__ that is covariant in its return type.r]r)ndigitsrcCsdSrr])rrr]r]r^ __round__1szSupportsRound.__round__N)r) rprmrnrrrrrrr]r]r]r^r5,sr5r]cCs@dd|D}dd|D}tj||||d}||_|j_|S)NcSsg|] \}}|qSr]r]rtnrur]r]r^rx7ryz!_make_nmtuple..cSs$i|]\}}|t|d|dqS)zfield z annotation must be a typerrr]r]r^r8sz!_make_nmtuple..rrW)rr namedtuplerVrW)rrkrWrfieldsnm_tplr]r]r^ _make_nmtuple6sr> r_replace_make_fields_asdict__getnewargs__rrW_field_defaults_source>rVrmrpc@seZdZddZdS)NamedTupleMetac s|dtusJdi}g}|D]L}|vr<||q$|r$td|dt|dkrZdnddd |q$t||fd d |Dd d }D]<}|tvrt d|q|t vr||j vrt |||q|S)NrrVzNon-default namedtuple field z cannot follow default fieldrs r1csg|] }|qSr]r])rtrnsr]r^rxWryz*NamedTupleMeta.__new__..rmrz&Cannot overwrite NamedTuple attribute ) _NamedTuplerrzrcrr5rr _prohibitedr_specialrr ) rtypenamerrrk default_names field_namerkeyr]rr^rWJs,     zNamedTupleMeta.__new__N)rprmrnrWr]r]r]r^rHsrc Ks`|dur|}n |rtdztdjdd}WnttfyPd}Yn0t|||dS)aTyped version of namedtuple. Usage in Python versions >= 3.6:: class Employee(NamedTuple): name: str id: int This is equivalent to:: Employee = collections.namedtuple('Employee', ['name', 'id']) The resulting class has an extra __annotations__ attribute, giving a dict that maps field names to types. (The field names are also in the _fields attribute, which is part of the namedtuple API.) Alternative equivalent keyword syntax is also accepted:: Employee = NamedTuple('Employee', name=str, id=int) In Python versions <= 3.5 use:: Employee = NamedTuple('Employee', [('name', str), ('id', int)]) NzIEither list of fields or keywords can be provided to NamedTuple, not bothrrprrW) rrcrrrrrrr)rrrrWr]r]r^r?bs  r?cCs*t|dkrtd|dtus$JtfS)Nrz5Multiple inheritance with NamedTuple is not supportedr)rrcr?rrr]r]r^_namedtuple_mro_entriess rc@s&eZdZdddZeZddZeZdS)_TypedDictMetaTc s|D]}t|turtdqtt|tf|i}|di}t|}dfdd|D}t} t} |D]@}| |j di| |j dd| |j ddqx| ||r| |n | ||_ t | _ t | _td s |_S) a5Create new typed dict class object. This method is called when TypedDict is subclassed, or when TypedDict is instantiated. This way TypedDict supports all three syntax forms described in its docstring. Subclasses and instances of TypedDict return actual dictionaries. zHcannot inherit from both a TypedDict type and a non-TypedDict base classrVz?TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a typecs"i|]\}}|t|jdqS)r)rirm)rtrrrftp_dictr]r^rsz*_TypedDictMeta.__new__..__required_keys__r]__optional_keys__ __total__)rYrrcrWr*rrr\rupdaterrVrCrrror) rrrrtotalrNr`own_annotationsown_annotation_keys required_keys optional_keysr]rr^rWs6           z_TypedDictMeta.__new__cCs tddS)Nz4TypedDict does not support instance and class checksr)rrr]r]r^rsz _TypedDictMeta.__subclasscheck__N)T)rprmrnrWr*rrrr]r]r]r^rs +rrc Ksj|dur|}n |rtddt|i}ztdjdd|d<WnttfyXYn0t|d||d S) aSA simple typed namespace. At runtime it is equivalent to a plain dict. TypedDict creates a dictionary type that expects all of its instances to have a certain set of keys, where each key is associated with a value of a consistent type. This expectation is not checked at runtime but is only enforced by type checkers. Usage:: class Point2D(TypedDict): x: int y: int label: str a: Point2D = {'x': 1, 'y': 2, 'label': 'good'} # OK b: Point2D = {'z': 3, 'label': 'bad'} # Fails type check assert Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first') The type info can be accessed via the Point2D.__annotations__ dict, and the Point2D.__required_keys__ and Point2D.__optional_keys__ frozensets. TypedDict supports two additional equivalent forms:: Point2D = TypedDict('Point2D', x=int, y=int, label=str) Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str}) By default, all keys must be present in a TypedDict. It is possible to override this by specifying totality. Usage:: class point2D(TypedDict, total=False): x: int y: int This means that a point2D TypedDict can have any of the keys omitted.A type checker is only expected to support a literal False or True as the value of the total argument. True is the default, and makes all items defined in the class body be required. The class syntax is only supported in Python 3.6+, while two other syntax forms work for Python 2.7 and 3.2+ Nz@TypedDict takes either a dict or keyword arguments, but not bothrVrrprrmr]r) rcr*rrrrrrr)rrrrrr]r]r^r@s* r@cCstfSr) _TypedDictrr]r]r^ryrcCsdd}||_||_|S)a%NewType creates simple unique types with almost zero runtime overhead. NewType(name, tp) is considered a subtype of tp by static type checkers. At runtime, NewType(name, tp) returns a dummy function that simply returns its argument. Usage:: UserId = NewType('UserId', int) def name_by_id(user_id: UserId) -> str: ... UserId('user') # Fails type check name_by_id(42) # Fails type check name_by_id(UserId(42)) # OK num = UserId(5) + 1 # type: int cSs|Srr])r(r]r]r^rzszNewType..new_type)rp __supertype__)rrrzr]r]r^rMsrMc@seZdZdZdZeeedddZeeedddZ eddd d Z eee dd d Z ee dd dZeddddZee dddZed7e edddZee dddZed8e edddZed9e eedddZed:e e e d d!d"Zee dd#d$Zee dd%d&Zed;e e d'd(d)Zee dd*d+Zeee d,d-d.Zeeedd/d0d1Zed2dd3d4Zeddd5d6ZdS)szIO.closecCsdSrr]rr]r]r^closedBsz IO.closedcCsdSrr]rr]r]r^filenoGsz IO.filenocCsdSrr]rr]r]r^flushKszIO.flushcCsdSrr]rr]r]r^isattyOsz IO.isattyr=)rrcCsdSrr])rrr]r]r^readSszIO.readcCsdSrr]rr]r]r^readableWsz IO.readable)limitrcCsdSrr])rrr]r]r^readline[sz IO.readline)hintrcCsdSrr])rrr]r]r^ readlines_sz IO.readlinesr)offsetwhencercCsdSrr])rrrr]r]r^seekcszIO.seekcCsdSrr]rr]r]r^seekablegsz IO.seekablecCsdSrr]rr]r]r^tellkszIO.tell)sizercCsdSrr])rrr]r]r^truncateosz IO.truncatecCsdSrr]rr]r]r^writablessz IO.writablerrcCsdSrr]rrr]r]r^writewszIO.write)linesrcCsdSrr])rrr]r]r^ writelines{sz IO.writelinesz IO[AnyStr]cCsdSrr]rr]r]r^ __enter__sz IO.__enter__cCsdSrr])rrYr tracebackr]r]r^__exit__sz IO.__exit__)r=)r=)r=)r)N) rprmrnrrpropertyrr[rrrrrrrrrrGrrrr;rrrrrrrrrrr]r]r]r^rC%sZ rCc@sBeZdZdZdZeeeefe dddZ eddddZ d S) rBz5Typed version of the return of open() in binary mode.r]rcCsdSrr]rr]r]r^rszBinaryIO.writercCsdSrr]rr]r]r^rszBinaryIO.__enter__N) rprmrnrrrrr bytearrayrrrr]r]r]r^rBs rBc@seZdZdZdZeeedddZeee dddZ eee e ddd Z eee dd d Zeeedd d ZeddddZdS)rFz3Typed version of the return of open() in text mode.r]rcCsdSrr]rr]r]r^buffersz TextIO.buffercCsdSrr]rr]r]r^encodingszTextIO.encodingcCsdSrr]rr]r]r^errorssz TextIO.errorscCsdSrr]rr]r]r^line_bufferingszTextIO.line_bufferingcCsdSrr]rr]r]r^newlinesszTextIO.newlinescCsdSrr]rr]r]r^rszTextIO.__enter__N)rprmrnrrrrrBrr[r rr rr r r rr]r]r]r^rFs&rFc@s$eZdZdZgdZeZeZeZdS)ioz)Wrapper namespace for IO generic classes.)rCrFrBN)rprmrnr__all__rCrFrBr]r]r]r^r s r z.ioc@s eZdZdZddgZeZeZdS)rez&Wrapper namespace for re type aliases.rErDN)rprmrnrrrErDr]r]r]r^rsrz.re)N)TN)N)NNF)r])N)N)rrirrrrcollections.abcrmrr8r stdlib_rerrkrrrrrr_rirrr~rrrrrrrCrrrrdrr rPr r rrrr rrrrar9r;r@rBrrrrr&r%_TYPING_INTERNALS_SPECIAL_NAMESr]rardrerjrurnrrwrrRrHrroBuiltinFunctionType MethodTyperrrLrrKrJrNrOrrQrIrrrrrrrrYrrr[rG_aliasrr'r*r)r(rrr.r%rr+r r=rr#rr!r$r"rr}rrr;dequer8rr>r rrr&rkrrlr-r*r9 defaultdictr:r<r7r6rAr,rr4r2r1r0r3r/r5rrrrr?rWrrrrr@rrMrSrTrCrBrFr rprrErDr]r]r]r^sh` !         %  !ATFS&! Q  b)5  ]                    #59 c#