summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-ext-autodoc/target/literal.py
blob: 4340e5103f09a4c4a6d87dd69a6bac108463c0c6 (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
from __future__ import annotations

from enum import Enum
from typing import Literal, TypeVar


class MyEnum(Enum):
    a = 1


T = TypeVar('T', bound=Literal[1234])
"""docstring"""


U = TypeVar('U', bound=Literal[MyEnum.a])
"""docstring"""


def bar(x: Literal[1234]):
    """docstring"""


def foo(x: Literal[MyEnum.a]):
    """docstring"""