1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
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"""