mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-10-12 16:32:10 -05:00
Upgrade autodoc to support type union operator introduced in PEP-604. It's available only with python 3.10+.
17 lines
292 B
Python
17 lines
292 B
Python
from __future__ import annotations
|
|
|
|
attr: int | str #: docstring
|
|
|
|
|
|
def sum(x: int | str, y: int | str) -> int | str:
|
|
"""docstring"""
|
|
|
|
|
|
class Foo:
|
|
"""docstring"""
|
|
|
|
attr: int | str #: docstring
|
|
|
|
def meth(self, x: int | str, y: int | str) -> int | str:
|
|
"""docstring"""
|