Decorators
decorators
Defines additional decorators than just @cell.
Decorators
Various decorators intended to be attached to a KCLayout.
Source code in kfactory/decorators.py
940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 | |
__init__
__init__(kcl: KCLayout) -> None
Just set the standard @cell decorator.
Source code in kfactory/decorators.py
943 944 945 | |
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
959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 | |
KCellDecorator
Bases: Protocol
Signature of the @cell decorator.
Source code in kfactory/decorators.py
896 897 898 899 900 901 902 903 | |
__call__
__call__(
**kwargs: Unpack[KCellDecoratorKWargs],
) -> Callable[
[Callable[KCellParams, K]], Callable[KCellParams, K]
]
call implementation.
Source code in kfactory/decorators.py
899 900 901 902 903 | |
KCellDecoratorKWargs
Bases: TypedDict
KWargs for @cell.
Source code in kfactory/decorators.py
875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 | |
ModuleCellKWargs
Bases: TypedDict
KWargs for @module_cell.
Source code in kfactory/decorators.py
855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 | |
ModuleDecorator
Bases: Protocol
Signature of the @module_cell decorator.
Source code in kfactory/decorators.py
906 907 908 909 910 911 912 913 | |
__call__
__call__(
**kwargs: Unpack[ModuleCellKWargs],
) -> Callable[
[Callable[KCellParams, K]], Callable[KCellParams, K]
]
call implementation.
Source code in kfactory/decorators.py
909 910 911 912 913 | |