Debian Codegraph @

tests/roots/test-ext-autodoc/target/literal.py

raw
1 from __future__ import annotations
2
3 from enum import Enum
4 from typing import Literal, TypeVar
5
6
7 class MyEnum(Enum):
8 a = 1
9 b = 2
10
11
12 T = TypeVar('T', bound=Literal[1234, 'abcd'])
13 """docstring"""
14
15
16 U = TypeVar('U', bound=Literal[MyEnum.a, MyEnum.b])
17 """docstring"""
18
19
20 def bar(x: Literal[1234, 'abcd']):
21 """docstring"""
22
23
24 def foo(x: Literal[MyEnum.a, MyEnum.b]):
25 """docstring"""