File indexing completed on 2024-05-12 05:51:58

0001 #!/bin/env python3
0002 import typing
0003 
0004 def foo1():
0005     """function w/o params"""
0006     pass
0007 
0008 if toto == True:
0009     def foo2():
0010         pass
0011 else:
0012     def foo2():
0013         pass
0014 
0015 class β:
0016     def α () :
0017         pass
0018     pass
0019     
0020 class class1:
0021     pass
0022 
0023 def foo3(param):
0024     pass
0025 
0026 def foo4(param1, param2="default") -> float:
0027     pass
0028     
0029 def foo5 (a, /, param1 : int , param2 : typing.Optional[typing.Union[typing.Sequence[typing.Any], typing.Mapping]]=None)->typing:Mapping[str, typing.Sequence[int]]:
0030     """function with params annotations and return annotations"""
0031     pass
0032 
0033 def foo6 (a, /, param1:int, 
0034           param2:typing.Optional[typing.Union[typing.Sequence[typing.Any], typing.Mapping]]=None) -> typing:Mapping[str, typing.Sequence[int]]:
0035     """function with params annotations and return annotations
0036         params on multiple lines WITHOUT line continuation character
0037     """
0038     pass
0039 
0040 class class2 (class1, β ):
0041     pass
0042 
0043 class class³(class1, 
0044              toto=1):
0045     pass
0046 
0047 class class4():
0048     def __init__(self):
0049         pass
0050         
0051     def method_with_annotated_return(self) -> typing.Sequence:
0052         pass
0053         
0054     def foo1_in_class4(self, /, param1:float,
0055                        param2:int) -> list:
0056         pass
0057         
0058     def foo2_in_class4(self, *args, **kwargs) -> bool:
0059         pass
0060         
0061     def τ(self, α:float):
0062         pass