mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
25 lines
344 B
Python
25 lines
344 B
Python
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"""
|