Decorators
decorators
Defines additional decorators than just @cell.
Decorators
Various decorators intended to be attached to a KCLayout.
Source code in kfactory/decorators.py
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 976 977 978 979 980 | |
__init__
__init__(kcl: KCLayout) -> None
Just set the standard @cell decorator.
Source code in kfactory/decorators.py
948 949 950 | |
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
964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 | |
KCellDecorator
Bases: Protocol
Signature of the @cell decorator.
Source code in kfactory/decorators.py
901 902 903 904 905 906 907 908 | |
__call__
__call__(
**kwargs: Unpack[KCellDecoratorKWargs],
) -> Callable[
[Callable[KCellParams, K]], Callable[KCellParams, K]
]
call implementation.
Source code in kfactory/decorators.py
904 905 906 907 908 | |
KCellDecoratorKWargs
Bases: TypedDict
KWargs for @cell.
Source code in kfactory/decorators.py
880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 | |
ModuleCellKWargs
Bases: TypedDict
KWargs for @module_cell.
Source code in kfactory/decorators.py
860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 | |
ModuleDecorator
Bases: Protocol
Signature of the @module_cell decorator.
Source code in kfactory/decorators.py
911 912 913 914 915 916 917 918 | |
__call__
__call__(
**kwargs: Unpack[ModuleCellKWargs],
) -> Callable[
[Callable[KCellParams, K]], Callable[KCellParams, K]
]
call implementation.
Source code in kfactory/decorators.py
914 915 916 917 918 | |