blob: 5ba0294fbd628d3d6d517bd462aaff8bb3738234 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
from inspect import Parameter, Signature
from typing import List, Union
class Foo:
pass
class Bar:
def __init__(self, x, y):
pass
class Baz:
def __new__(cls, x, y):
pass
class Qux:
__signature__ = Signature(parameters=[Parameter('foo', Parameter.POSITIONAL_OR_KEYWORD),
Parameter('bar', Parameter.POSITIONAL_OR_KEYWORD)])
def __init__(self, x, y):
pass
class Quux(List[Union[int, float]]):
"""A subclass of List[Union[int, float]]"""
pass
class Corge(Quux):
pass
Alias = Foo
#: docstring
OtherAlias = Bar
#: docstring
IntAlias = int
|