blob: e5cce7a69dec541fc36e859388753be97f36f7a0 (
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
43
44
|
from __future__ import annotations
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
|