Decorators
decorators
Defines additional decorators than just @cell.
Decorators
Various decorators intended to be attached to a KCLayout.
Source code in kfactory/decorators.py
1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 | |
__init__
__init__(kcl: KCLayout) -> None
Just set the standard @cell decorator.
Source code in kfactory/decorators.py
1024 1025 1026 | |
module_cell
module_cell(
_func: Callable[KCellParams, KC],
) -> Callable[KCellParams, KC]
module_cell(
**kwargs: Unpack[ModuleCellKWargs],
) -> Callable[
[Callable[KCellParams, KC]], Callable[KCellParams, KC]
]
module_cell(
_func: Callable[KCellParams, KC] | None = None,
/,
**kwargs: Unpack[ModuleCellKWargs],
) -> (
Callable[KCellParams, KC]
| Callable[
[Callable[KCellParams, KC]],
Callable[KCellParams, KC],
]
)
Constructs the @module_cell decorator on KCLayout.decorators.
Source code in kfactory/decorators.py
1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 | |
KCellDecorator
Bases: Protocol
Signature of the @cell decorator.
Source code in kfactory/decorators.py
977 978 979 980 981 982 983 984 | |
__call__
__call__(
**kwargs: Unpack[KCellDecoratorKWargs],
) -> Callable[
[Callable[KCellParams, K]], Callable[KCellParams, K]
]
call implementation.
Source code in kfactory/decorators.py
980 981 982 983 984 | |
KCellDecoratorKWargs
Bases: TypedDict
KWargs for @cell.
Source code in kfactory/decorators.py
956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 | |
ModuleCellKWargs
Bases: TypedDict
KWargs for @module_cell.
Source code in kfactory/decorators.py
936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 | |
ModuleDecorator
Bases: Protocol
Signature of the @module_cell decorator.
Source code in kfactory/decorators.py
987 988 989 990 991 992 993 994 | |
__call__
__call__(
**kwargs: Unpack[ModuleCellKWargs],
) -> Callable[
[Callable[KCellParams, K]], Callable[KCellParams, K]
]
call implementation.
Source code in kfactory/decorators.py
990 991 992 993 994 | |