File tree Expand file tree Collapse file tree
python-3.11/pybind11-v3.0/numpy-array-wrap-with-annotated/demo/_bindings
python-3.12/pybind11-v3.0
numpy-array-use-type-var/demo/_bindings
numpy-array-wrap-with-annotated/demo/_bindings Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3+ import enum
34import typing
45
56__all__ : list [str ] = [
67 "Blue" ,
78 "ConsoleForegroundColor" ,
89 "Green" ,
910 "Magenta" ,
11+ "NativeColor" ,
1012 "None_" ,
1113 "Yellow" ,
1214 "accept_defaulted_enum" ,
@@ -62,6 +64,13 @@ class ConsoleForegroundColor:
6264 @property
6365 def value (self ) -> int : ...
6466
67+ class NativeColor (enum .IntEnum ):
68+ Blue : typing .ClassVar [NativeColor ] # value = <NativeColor.Blue: 2>
69+ Red : typing .ClassVar [NativeColor ] # value = <NativeColor.Red: 1>
70+ @classmethod
71+ def __new__ (cls , value ): ...
72+ def __format__ (self , format_spec ): ...
73+
6574def accept_defaulted_enum (
6675 color : ConsoleForegroundColor = ConsoleForegroundColor .None_ ,
6776) -> None : ...
Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3+ import enum
34import typing
45
56__all__ : list [str ] = [
67 "Blue" ,
78 "ConsoleForegroundColor" ,
89 "Green" ,
910 "Magenta" ,
11+ "NativeColor" ,
1012 "None_" ,
1113 "Yellow" ,
1214 "accept_defaulted_enum" ,
@@ -62,6 +64,16 @@ class ConsoleForegroundColor:
6264 @property
6365 def value (self ) -> int : ...
6466
67+ class NativeColor (enum .IntEnum ):
68+ Blue : typing .ClassVar [NativeColor ] # value = <NativeColor.Blue: 2>
69+ Red : typing .ClassVar [NativeColor ] # value = <NativeColor.Red: 1>
70+ @classmethod
71+ def __new__ (cls , value ): ...
72+ def __format__ (self , format_spec ):
73+ """
74+ Convert to a string according to format_spec.
75+ """
76+
6577def accept_defaulted_enum (
6678 color : ConsoleForegroundColor = ConsoleForegroundColor .None_ ,
6779) -> None : ...
Original file line number Diff line number Diff line change 11from __future__ import annotations
22
3+ import enum
34import typing
45
56__all__ : list [str ] = [
67 "Blue" ,
78 "ConsoleForegroundColor" ,
89 "Green" ,
910 "Magenta" ,
11+ "NativeColor" ,
1012 "None_" ,
1113 "Yellow" ,
1214 "accept_defaulted_enum" ,
@@ -62,6 +64,16 @@ class ConsoleForegroundColor:
6264 @property
6365 def value (self ) -> int : ...
6466
67+ class NativeColor (enum .IntEnum ):
68+ Blue : typing .ClassVar [NativeColor ] # value = <NativeColor.Blue: 2>
69+ Red : typing .ClassVar [NativeColor ] # value = <NativeColor.Red: 1>
70+ @classmethod
71+ def __new__ (cls , value ): ...
72+ def __format__ (self , format_spec ):
73+ """
74+ Convert to a string according to format_spec.
75+ """
76+
6577def accept_defaulted_enum (
6678 color : ConsoleForegroundColor = ConsoleForegroundColor .None_ ,
6779) -> None : ...
You can’t perform that action at this time.
0 commit comments