1+ import typing
12from typing import ClassVar , overload
23
34PI : float
@@ -14,23 +15,23 @@ class Point:
1415 __entries : ClassVar [dict ] = ...
1516 degree : ClassVar [Point .AngleUnit ] = ...
1617 radian : ClassVar [Point .AngleUnit ] = ...
17- def __init__ (self , value : int ) -> None :
18- """__init__(self: pybind11_fixtures.demo.Point.AngleUnit, value: int ) -> None"""
18+ def __init__ (self , value : typing . SupportsInt ) -> None :
19+ """__init__(self: pybind11_fixtures.demo.Point.AngleUnit, value: typing.SupportsInt ) -> None"""
1920 def __eq__ (self , other : object ) -> bool :
20- """__eq__(self: object, other: object) -> bool"""
21+ """__eq__(self: object, other: object, / ) -> bool"""
2122 def __hash__ (self ) -> int :
22- """__hash__(self: object) -> int"""
23+ """__hash__(self: object, / ) -> int"""
2324 def __index__ (self ) -> int :
24- """__index__(self: pybind11_fixtures.demo.Point.AngleUnit) -> int"""
25+ """__index__(self: pybind11_fixtures.demo.Point.AngleUnit, / ) -> int"""
2526 def __int__ (self ) -> int :
26- """__int__(self: pybind11_fixtures.demo.Point.AngleUnit) -> int"""
27+ """__int__(self: pybind11_fixtures.demo.Point.AngleUnit, / ) -> int"""
2728 def __ne__ (self , other : object ) -> bool :
28- """__ne__(self: object, other: object) -> bool"""
29+ """__ne__(self: object, other: object, / ) -> bool"""
2930 @property
3031 def name (self ) -> str :
31- """name(self: handle ) -> str
32+ """name(self: object, / ) -> str
3233
33- name(self: handle ) -> str
34+ name(self: object, / ) -> str
3435 """
3536 @property
3637 def value (self ) -> int :
@@ -49,23 +50,23 @@ class Point:
4950 inch : ClassVar [Point .LengthUnit ] = ...
5051 mm : ClassVar [Point .LengthUnit ] = ...
5152 pixel : ClassVar [Point .LengthUnit ] = ...
52- def __init__ (self , value : int ) -> None :
53- """__init__(self: pybind11_fixtures.demo.Point.LengthUnit, value: int ) -> None"""
53+ def __init__ (self , value : typing . SupportsInt ) -> None :
54+ """__init__(self: pybind11_fixtures.demo.Point.LengthUnit, value: typing.SupportsInt ) -> None"""
5455 def __eq__ (self , other : object ) -> bool :
55- """__eq__(self: object, other: object) -> bool"""
56+ """__eq__(self: object, other: object, / ) -> bool"""
5657 def __hash__ (self ) -> int :
57- """__hash__(self: object) -> int"""
58+ """__hash__(self: object, / ) -> int"""
5859 def __index__ (self ) -> int :
59- """__index__(self: pybind11_fixtures.demo.Point.LengthUnit) -> int"""
60+ """__index__(self: pybind11_fixtures.demo.Point.LengthUnit, / ) -> int"""
6061 def __int__ (self ) -> int :
61- """__int__(self: pybind11_fixtures.demo.Point.LengthUnit) -> int"""
62+ """__int__(self: pybind11_fixtures.demo.Point.LengthUnit, / ) -> int"""
6263 def __ne__ (self , other : object ) -> bool :
63- """__ne__(self: object, other: object) -> bool"""
64+ """__ne__(self: object, other: object, / ) -> bool"""
6465 @property
6566 def name (self ) -> str :
66- """name(self: handle ) -> str
67+ """name(self: object, / ) -> str
6768
68- name(self: handle ) -> str
69+ name(self: object, / ) -> str
6970 """
7071 @property
7172 def value (self ) -> int :
@@ -84,25 +85,25 @@ class Point:
8485
8586 1. __init__(self: pybind11_fixtures.demo.Point) -> None
8687
87- 2. __init__(self: pybind11_fixtures.demo.Point, x: float , y: float ) -> None
88+ 2. __init__(self: pybind11_fixtures.demo.Point, x: typing.SupportsFloat , y: typing.SupportsFloat ) -> None
8889 """
8990 @overload
90- def __init__ (self , x : float , y : float ) -> None :
91+ def __init__ (self , x : typing . SupportsFloat , y : typing . SupportsFloat ) -> None :
9192 """__init__(*args, **kwargs)
9293 Overloaded function.
9394
9495 1. __init__(self: pybind11_fixtures.demo.Point) -> None
9596
96- 2. __init__(self: pybind11_fixtures.demo.Point, x: float , y: float ) -> None
97+ 2. __init__(self: pybind11_fixtures.demo.Point, x: typing.SupportsFloat , y: typing.SupportsFloat ) -> None
9798 """
9899 def as_list (self ) -> list [float ]:
99- """as_list(self: pybind11_fixtures.demo.Point) -> List [float]"""
100+ """as_list(self: pybind11_fixtures.demo.Point) -> list [float]"""
100101 @overload
101- def distance_to (self , x : float , y : float ) -> float :
102+ def distance_to (self , x : typing . SupportsFloat , y : typing . SupportsFloat ) -> float :
102103 """distance_to(*args, **kwargs)
103104 Overloaded function.
104105
105- 1. distance_to(self: pybind11_fixtures.demo.Point, x: float , y: float ) -> float
106+ 1. distance_to(self: pybind11_fixtures.demo.Point, x: typing.SupportsFloat , y: typing.SupportsFloat ) -> float
106107
107108 2. distance_to(self: pybind11_fixtures.demo.Point, other: pybind11_fixtures.demo.Point) -> float
108109 """
@@ -111,7 +112,7 @@ class Point:
111112 """distance_to(*args, **kwargs)
112113 Overloaded function.
113114
114- 1. distance_to(self: pybind11_fixtures.demo.Point, x: float , y: float ) -> float
115+ 1. distance_to(self: pybind11_fixtures.demo.Point, x: typing.SupportsFloat , y: typing.SupportsFloat ) -> float
115116
116117 2. distance_to(self: pybind11_fixtures.demo.Point, other: pybind11_fixtures.demo.Point) -> float
117118 """
@@ -124,12 +125,12 @@ def answer() -> int:
124125
125126 answer docstring, with end quote"
126127 '''
127- def midpoint (left : float , right : float ) -> float :
128- """midpoint(left: float , right: float ) -> float"""
129- def sum (arg0 : int , arg1 : int ) -> int :
130- '''sum(arg0: int , arg1: int ) -> int
128+ def midpoint (left : typing . SupportsFloat , right : typing . SupportsFloat ) -> float :
129+ """midpoint(left: typing.SupportsFloat , right: typing.SupportsFloat ) -> float"""
130+ def sum (arg0 : typing . SupportsInt , arg1 : typing . SupportsInt ) -> int :
131+ '''sum(arg0: typing.SupportsInt , arg1: typing.SupportsInt ) -> int
131132
132133 multiline docstring test, edge case quotes """\' \' \'
133134 '''
134- def weighted_midpoint (left : float , right : float , alpha : float = ...) -> float :
135- """weighted_midpoint(left: float , right: float , alpha: float = 0.5) -> float"""
135+ def weighted_midpoint (left : typing . SupportsFloat , right : typing . SupportsFloat , alpha : typing . SupportsFloat = ...) -> float :
136+ """weighted_midpoint(left: typing.SupportsFloat , right: typing.SupportsFloat , alpha: typing.SupportsFloat = 0.5) -> float"""
0 commit comments