type_stub
This module has an accompanying .pyi file with type stubs.
1""" 2This module has an accompanying .pyi file with type stubs. 3""" 4 5 6def func(x, y): 7 """A simple function.""" 8 9 10var = [] 11"""A simple variable.""" 12 13 14class Class: 15 attr = 42 16 """An attribute""" 17 18 def meth(self, y): 19 """A simple method.""" 20 21 class Subclass: 22 attr = "42" 23 """An attribute""" 24 25 def meth(self, y): 26 """A simple method.""" 27 28 def no_type_annotation(self, z): 29 """A method not present in the .pyi file.""" 30 31 def overloaded(self, x): 32 """An overloaded method."""
def
func(x: str, y: Any, z: Iterable[str]) -> int:
A simple function.
var: list[str] =
[]
Docstring override from the .pyi file.
class
Class:
15class Class: 16 attr = 42 17 """An attribute""" 18 19 def meth(self, y): 20 """A simple method.""" 21 22 class Subclass: 23 attr = "42" 24 """An attribute""" 25 26 def meth(self, y): 27 """A simple method.""" 28 29 def no_type_annotation(self, z): 30 """A method not present in the .pyi file.""" 31 32 def overloaded(self, x): 33 """An overloaded method."""
class
Class.Subclass: