mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
autodoc_type_aliases allows to keep user defined type alises not evaluated in the generated document.
26 lines
326 B
Python
26 lines
326 B
Python
from __future__ import annotations
|
|
from typing import overload
|
|
|
|
|
|
myint = int
|
|
|
|
|
|
def sum(x: myint, y: myint) -> myint:
|
|
"""docstring"""
|
|
return x + y
|
|
|
|
|
|
@overload
|
|
def mult(x: myint, y: myint) -> myint:
|
|
...
|
|
|
|
|
|
@overload
|
|
def mult(x: float, y: float) -> float:
|
|
...
|
|
|
|
|
|
def mult(x, y):
|
|
"""docstring"""
|
|
return x, y
|