Skip to content

better_error_message#838

Closed
joamatab wants to merge 5 commits intomainfrom
better_error_message
Closed

better_error_message#838
joamatab wants to merge 5 commits intomainfrom
better_error_message

Conversation

@joamatab
Copy link
Copy Markdown
Collaborator

@joamatab joamatab commented Dec 2, 2025

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 2, 2025

Label error. Requires at least 1 of: breaking, bug, github_actions, documentation, dependencies, enhancement, feature, maintenance, security, typing. Found:

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Dec 2, 2025

Ty Results

Found 141 diagnostics when type checking the codebase.

View full ty output
error[index-out-of-bounds]: Index 2 is out of bounds for tuple `tuple[LayerInfo, int | float]` with length 2
   --> src/kfactory/cross_section.py:552:49
    |
550 | …                         section[0],
551 | …                         self.kcl.to_dbu(section[1]),
552 | …                         self.kcl.to_dbu(section[2]),
    |                                           ^^^^^^^
553 | …                     )
554 | …                     for section in cross_section.get("sections", [])
    |
info: rule `index-out-of-bounds` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `__name__`
   --> src/kfactory/decorators.py:257:16
    |
255 |         name = f.__name__
256 |     elif hasattr(f, "func"):
257 |         name = f.func.__name__
    |                ^^^^^^^^^^^^^^^
258 |     else:
259 |         raise ValueError(f"Function {f} has no name.")
    |
info: rule `unresolved-attribute` is enabled by default

error[invalid-return-type]: Return type does not match returned value
   --> src/kfactory/decorators.py:260:12
    |
258 |     else:
259 |         raise ValueError(f"Function {f} has no name.")
260 |     return name
    |            ^^^^ expected `str`, found `object`
    |
   ::: src/kfactory/decorators.py:253:50
    |
253 | def _get_function_name(f: Callable[..., Any]) -> str:
    |                                                  --- Expected `str` because of return type
254 |     if hasattr(f, "__name__"):
255 |         name = f.__name__
    |
info: rule `invalid-return-type` is enabled by default

error[unresolved-attribute]: Object of type `(**KCellParams@WrappedKCellFunc) -> ProtoTKCell[Any]` has no attribute `__name__`
   --> src/kfactory/decorators.py:436:43
    |
434 |                             name=name_,
435 |                             module=f.__module__,
436 |                             function_name=f.__name__,
    |                                           ^^^^^^^^^^
437 |                             lno=inspect.getsourcelines(f)[1],
438 |                         )
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `() -> object` has no attribute `__code__`
   --> src/kfactory/decorators.py:561:25
    |
559 |             return Path(self._f_orig.__code__.co_filename).resolve()
560 |         if isinstance(self._f_orig, functools.partial):
561 |             return Path(self._f_orig.func.__code__.co_filename).resolve()
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
562 |         return Path(self._f_orig.__code__.co_filename).resolve()
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `((**KCellParams@WrappedKCellFunc) -> ProtoTKCell[Any]) & ~FunctionType & ~Top[partial[Unknown]]` has no attribute `__code__`
   --> src/kfactory/decorators.py:562:21
    |
560 |         if isinstance(self._f_orig, functools.partial):
561 |             return Path(self._f_orig.func.__code__.co_filename).resolve()
562 |         return Path(self._f_orig.__code__.co_filename).resolve()
    |                     ^^^^^^^^^^^^^^^^^^^^^
563 |
564 |     def prune(self) -> None:
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `() -> object` has no attribute `__code__`
   --> src/kfactory/decorators.py:747:25
    |
745 |             return Path(self._f_orig.__code__.co_filename).resolve()
746 |         if isinstance(self._f_orig, functools.partial):
747 |             return Path(self._f_orig.func.__code__.co_filename).resolve()
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
748 |         return Path(self._f_orig.__code__.co_filename).resolve()
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `((**KCellParams@WrappedVKCellFunc) -> VKCell) & ~FunctionType & ~Top[partial[Unknown]]` has no attribute `__code__`
   --> src/kfactory/decorators.py:748:21
    |
746 |         if isinstance(self._f_orig, functools.partial):
747 |             return Path(self._f_orig.func.__code__.co_filename).resolve()
748 |         return Path(self._f_orig.__code__.co_filename).resolve()
    |                     ^^^^^^^^^^^^^^^^^^^^^
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `(**KCellParams@_module_cell) -> KC_co@_module_cell` has no attribute `__name__`
   --> src/kfactory/decorators.py:826:20
    |
824 |     ) -> Callable[KCellParams, KC_co]:
825 |         mod = f.__module__
826 |         basename = f.__name__ if mod == "__main" else f"{mod}_{f.__name__}"
    |                    ^^^^^^^^^^
827 |         return cell_decorator(basename=basename, **kwargs)(f)
    |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `(**KCellParams@_module_cell) -> KC_co@_module_cell` has no attribute `__name__`
   --> src/kfactory/decorators.py:826:64
    |
824 |     ) -> Callable[KCellParams, KC_co]:
825 |         mod = f.__module__
826 |         basename = f.__name__ if mod == "__main" else f"{mod}_{f.__name__}"
    |                                                                ^^^^^^^^^^
827 |         return cell_decorator(basename=basename, **kwargs)(f)
    |
info: rule `unresolved-attribute` is enabled by default

error[call-non-callable]: Object of type `list[int | float]` is not callable
   --> src/kfactory/enclosure.py:323:28
    |
321 |                 def w_max(x: float, section: Section = section) -> float:
322 |                     assert section.d_max is not None
323 |                     return widths(x) + 2 * section.d_max * target.kcl.layout.dbu
    |                            ^^^^^^^^^
324 |
325 |                 r = kdb.Region(
    |
info: Union variant `list[int | float]` is incompatible with this call site
info: Attempted to call union type `((int | float, /) -> int | float) | list[int | float]`
info: rule `call-non-callable` is enabled by default

error[call-non-callable]: Object of type `list[int | float]` is not callable
   --> src/kfactory/enclosure.py:341:32
    |
339 |                     def w_min(x: float, section: Section = section) -> float:
340 |                         assert section.d_min is not None
341 |                         return widths(x) + 2 * section.d_min * target.kcl.layout.dbu
    |                                ^^^^^^^^^
342 |
343 |                     r -= kdb.Region(
    |
info: Union variant `list[int | float]` is incompatible with this call site
info: Attempted to call union type `((int | float, /) -> int | float) | list[int | float]`
info: rule `call-non-callable` is enabled by default

error[index-out-of-bounds]: Index 2 is out of bounds for tuple `tuple[LayerInfo, int | float]` with length 2
   --> src/kfactory/enclosure.py:553:40
    |
551 |                             section[0],
552 |                             kcl.to_dbu(section[1]),
553 |                             kcl.to_dbu(section[2]),
    |                                        ^^^^^^^
554 |                         )
555 |                     )
    |
info: rule `index-out-of-bounds` is enabled by default

error[index-out-of-bounds]: Index 2 is out of bounds for tuple `tuple[LayerInfo, int]` with length 2
   --> src/kfactory/enclosure.py:567:31
    |
565 |                 layer_sections[sec[0]] = ls
566 |             ls.add_section(Section(d_max=sec[1])) if len(sec) < 3 else ls.add_section(  # noqa: PLR2004
567 |                 Section(d_max=sec[2], d_min=sec[1])
    |                               ^^^
568 |             )
569 |         super().__init__(
    |
info: rule `index-out-of-bounds` is enabled by default

error[invalid-assignment]: Property `_name` defined in `Self@__init__` is read-only
   --> src/kfactory/enclosure.py:575:9
    |
573 |             bbox_sections={t[0]: t[1] for t in bbox_sections},
574 |         )
575 |         self._name = name
    |         ^^^^^^^^^^
576 |
577 |     @model_serializer
    |
info: rule `invalid-assignment` is enabled by default

error[no-matching-overload]: No overload of bound method `__init__` matches arguments
   --> src/kfactory/enclosure.py:638:25
    |
636 |         shape_ = shape(abs(d))
637 |         if isinstance(shape_, list):
638 |             box_shape = kdb.Polygon(shape_)
    |                         ^^^^^^^^^^^^^^^^^^^
639 |             bbox_maxsize = max(
640 |                 box_shape.bbox().width(),
    |
info: First overload defined here
     --> .venv/lib/python3.12/site-packages/klayout/dbcore.pyi:54612:9
      |
54610 |         ...
54611 |     @overload
54612 |     def __init__(self) -> None:
      |         ^^^^^^^^^^^^^^^^^^^^^^
54613 |         r"""
54614 |         @brief Creates an empty (invalid) polygon
      |
info: Possible overloads for bound method `__init__`:
info:   (self) -> None
info:   (self, box: Box) -> None
info:   (self, dpolygon: DPolygon) -> None
info:   (self, pts: Sequence[Point], raw: bool | None = EllipsisType) -> None
info:   (self, sp: SimplePolygon) -> None
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `__init__` matches arguments
    --> src/kfactory/enclosure.py:1314:25
     |
1312 |         shape_ = shape(abs(d))
1313 |         if isinstance(shape_, list):
1314 |             box_shape = kdb.Polygon(shape_)
     |                         ^^^^^^^^^^^^^^^^^^^
1315 |             bbox_maxsize = max(
1316 |                 box_shape.bbox().width(),
     |
info: First overload defined here
     --> .venv/lib/python3.12/site-packages/klayout/dbcore.pyi:54612:9
      |
54610 |         ...
54611 |     @overload
54612 |     def __init__(self) -> None:
      |         ^^^^^^^^^^^^^^^^^^^^^^
54613 |         r"""
54614 |         @brief Creates an empty (invalid) polygon
      |
info: Possible overloads for bound method `__init__`:
info:   (self) -> None
info:   (self, box: Box) -> None
info:   (self, dpolygon: DPolygon) -> None
info:   (self, pts: Sequence[Point], raw: bool | None = EllipsisType) -> None
info:   (self, sp: SimplePolygon) -> None
info: rule `no-matching-overload` is enabled by default

warning[possibly-missing-attribute]: Attribute `name` may be missing on object of type `LayerEnclosure | (LayerEnclosureSpec & ~str & ~Top[dict[Unknown, Unknown]])`
    --> src/kfactory/enclosure.py:1653:12
     |
1651 |                 )
1652 |
1653 |         if enclosure.name not in self.root:
     |            ^^^^^^^^^^^^^^
1654 |             self.root[enclosure.name] = enclosure
1655 |             return enclosure
     |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `str` and value of type `LayerEnclosure | (LayerEnclosureSpec & ~str & ~Top[dict[Unknown, Unknown]])` on object of type `dict[str, LayerEnclosure]`
    --> src/kfactory/enclosure.py:1654:13
     |
1653 |         if enclosure.name not in self.root:
1654 |             self.root[enclosure.name] = enclosure
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^---------
     |                                         |
     |                                         Expected value of type `LayerEnclosure`, got `LayerEnclosure | (LayerEnclosureSpec & ~str & ~Top[dict[Unknown, Unknown]])`
1655 |             return enclosure
1656 |         return self.root[enclosure.name]
     |
info: rule `invalid-assignment` is enabled by default

warning[possibly-missing-attribute]: Attribute `name` may be missing on object of type `LayerEnclosure | (LayerEnclosureSpec & ~str & ~Top[dict[Unknown, Unknown]])`
    --> src/kfactory/enclosure.py:1654:23
     |
1653 |         if enclosure.name not in self.root:
1654 |             self.root[enclosure.name] = enclosure
     |                       ^^^^^^^^^^^^^^
1655 |             return enclosure
1656 |         return self.root[enclosure.name]
     |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-return-type]: Return type does not match returned value
    --> src/kfactory/enclosure.py:1655:20
     |
1653 |         if enclosure.name not in self.root:
1654 |             self.root[enclosure.name] = enclosure
1655 |             return enclosure
     |                    ^^^^^^^^^ expected `LayerEnclosure`, found `LayerEnclosure | (LayerEnclosureSpec & ~str & ~Top[dict[Unknown, Unknown]])`
1656 |         return self.root[enclosure.name]
     |
    ::: src/kfactory/enclosure.py:1634:10
     |
1632 |         enclosure: str | LayerEnclosure | LayerEnclosureSpec,
1633 |         kcl: KCLayout,
1634 |     ) -> LayerEnclosure:
     |          -------------- Expected `LayerEnclosure` because of return type
1635 |         if isinstance(enclosure, str):
1636 |             return self[enclosure]
     |
info: rule `invalid-return-type` is enabled by default

warning[possibly-missing-attribute]: Attribute `name` may be missing on object of type `LayerEnclosure | (LayerEnclosureSpec & ~str & ~Top[dict[Unknown, Unknown]])`
    --> src/kfactory/enclosure.py:1656:26
     |
1654 |             self.root[enclosure.name] = enclosure
1655 |             return enclosure
1656 |         return self.root[enclosure.name]
     |                          ^^^^^^^^^^^^^^
     |
info: rule `possibly-missing-attribute` is enabled by default

error[invalid-assignment]: Object of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))` is not assignable to `(...) -> dict[str, int | float | str | ... omitted 36 union elements]`
   --> src/kfactory/factories/bezier.py:121:32
    |
119 |       """
120 |       if callable(additional_info) and additional_info is not None:
121 |           _additional_info_func: Callable[
    |  ________________________________-
122 | |             ...,
123 | |             dict[str, MetaData],
124 | |         ] = additional_info
    | |         -   ^^^^^^^^^^^^^^^ Incompatible value of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))`
    | |_________|
    |           Declared type
125 |           _additional_info: dict[str, MetaData] = {}
126 |       else:
    |
info: rule `invalid-assignment` is enabled by default

error[no-matching-overload]: No overload of bound method `update` matches arguments
   --> src/kfactory/factories/bezier.py:215:9
    |
213 |             )
214 |         )
215 |         _info.update(_additional_info)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
216 |         c.info = Info(**_info)
    |
info: First overload defined here
    --> stdlib/typing.pyi:1343:9
     |
1341 |     # -- weakref.WeakKeyDictionary.__ior__
1342 |     @overload
1343 |     def update(self, m: SupportsKeysAndGetItem[_KT, _VT], /) -> None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1344 |         """D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
1345 |         If E present and has a .keys() method, does:     for k in E.keys(): D[k] = E[k]
     |
info: Possible overloads for bound method `update`:
info:   (self, m: SupportsKeysAndGetItem[_KT@MutableMapping, _VT@MutableMapping], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: SupportsKeysAndGetItem[str, _VT@MutableMapping], /, **kwargs: _VT@MutableMapping) -> None
info:   (self, m: Iterable[tuple[_KT@MutableMapping, _VT@MutableMapping]], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: Iterable[tuple[str, _VT@MutableMapping]], /, **kwargs: _VT@MutableMapping) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], **kwargs: _VT@MutableMapping) -> None
info: rule `no-matching-overload` is enabled by default

error[invalid-assignment]: Object of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))` is not assignable to `(...) -> dict[str, int | float | str | ... omitted 36 union elements]`
   --> src/kfactory/factories/circular.py:104:32
    |
102 |       """
103 |       if callable(additional_info):
104 |           _additional_info_func: Callable[
    |  ________________________________-
105 | |             ...,
106 | |             dict[str, MetaData],
107 | |         ] = additional_info
    | |         -   ^^^^^^^^^^^^^^^ Incompatible value of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))`
    | |_________|
    |           Declared type
108 |           _additional_info: dict[str, MetaData] = {}
109 |       else:
    |
info: rule `invalid-assignment` is enabled by default

error[no-matching-overload]: No overload of bound method `update` matches arguments
   --> src/kfactory/factories/circular.py:210:9
    |
208 |             )
209 |         )
210 |         _info.update(_additional_info)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
211 |         c.info = Info(**_info)
212 |         return c
    |
info: First overload defined here
    --> stdlib/typing.pyi:1343:9
     |
1341 |     # -- weakref.WeakKeyDictionary.__ior__
1342 |     @overload
1343 |     def update(self, m: SupportsKeysAndGetItem[_KT, _VT], /) -> None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1344 |         """D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
1345 |         If E present and has a .keys() method, does:     for k in E.keys(): D[k] = E[k]
     |
info: Possible overloads for bound method `update`:
info:   (self, m: SupportsKeysAndGetItem[_KT@MutableMapping, _VT@MutableMapping], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: SupportsKeysAndGetItem[str, _VT@MutableMapping], /, **kwargs: _VT@MutableMapping) -> None
info:   (self, m: Iterable[tuple[_KT@MutableMapping, _VT@MutableMapping]], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: Iterable[tuple[str, _VT@MutableMapping]], /, **kwargs: _VT@MutableMapping) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], **kwargs: _VT@MutableMapping) -> None
info: rule `no-matching-overload` is enabled by default

error[invalid-assignment]: Object of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))` is not assignable to `(...) -> dict[str, int | float | str | ... omitted 36 union elements]`
   --> src/kfactory/factories/euler.py:263:32
    |
261 |       """
262 |       if callable(additional_info) and additional_info is not None:
263 |           _additional_info_func: Callable[
    |  ________________________________-
264 | |             ...,
265 | |             dict[str, MetaData],
266 | |         ] = additional_info
    | |         -   ^^^^^^^^^^^^^^^ Incompatible value of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))`
    | |_________|
    |           Declared type
267 |           _additional_info: dict[str, MetaData] = {}
268 |       else:
    |
info: rule `invalid-assignment` is enabled by default

error[no-matching-overload]: No overload of bound method `update` matches arguments
   --> src/kfactory/factories/euler.py:361:9
    |
359 |             )
360 |         )
361 |         _info.update(_additional_info)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
362 |         c.info = Info(**_info)
363 |         c.boundary = center_path
    |
info: First overload defined here
    --> stdlib/typing.pyi:1343:9
     |
1341 |     # -- weakref.WeakKeyDictionary.__ior__
1342 |     @overload
1343 |     def update(self, m: SupportsKeysAndGetItem[_KT, _VT], /) -> None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1344 |         """D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
1345 |         If E present and has a .keys() method, does:     for k in E.keys(): D[k] = E[k]
     |
info: Possible overloads for bound method `update`:
info:   (self, m: SupportsKeysAndGetItem[_KT@MutableMapping, _VT@MutableMapping], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: SupportsKeysAndGetItem[str, _VT@MutableMapping], /, **kwargs: _VT@MutableMapping) -> None
info:   (self, m: Iterable[tuple[_KT@MutableMapping, _VT@MutableMapping]], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: Iterable[tuple[str, _VT@MutableMapping]], /, **kwargs: _VT@MutableMapping) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], **kwargs: _VT@MutableMapping) -> None
info: rule `no-matching-overload` is enabled by default

error[invalid-assignment]: Object of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))` is not assignable to `(...) -> dict[str, int | float | str | ... omitted 36 union elements]`
   --> src/kfactory/factories/euler.py:422:32
    |
420 |       """
421 |       if callable(additional_info):
422 |           _additional_info_func: Callable[
    |  ________________________________-
423 | |             ...,
424 | |             dict[str, MetaData],
425 | |         ] = additional_info
    | |         -   ^^^^^^^^^^^^^^^ Incompatible value of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))`
    | |_________|
    |           Declared type
426 |           _additional_info: dict[str, MetaData] = {}
427 |       else:
    |
info: rule `invalid-assignment` is enabled by default

error[no-matching-overload]: No overload of bound method `update` matches arguments
   --> src/kfactory/factories/euler.py:515:9
    |
513 |             )
514 |         )
515 |         _info.update(_additional_info)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
516 |         c.info = Info(**_info)
    |
info: First overload defined here
    --> stdlib/typing.pyi:1343:9
     |
1341 |     # -- weakref.WeakKeyDictionary.__ior__
1342 |     @overload
1343 |     def update(self, m: SupportsKeysAndGetItem[_KT, _VT], /) -> None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1344 |         """D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
1345 |         If E present and has a .keys() method, does:     for k in E.keys(): D[k] = E[k]
     |
info: Possible overloads for bound method `update`:
info:   (self, m: SupportsKeysAndGetItem[_KT@MutableMapping, _VT@MutableMapping], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: SupportsKeysAndGetItem[str, _VT@MutableMapping], /, **kwargs: _VT@MutableMapping) -> None
info:   (self, m: Iterable[tuple[_KT@MutableMapping, _VT@MutableMapping]], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: Iterable[tuple[str, _VT@MutableMapping]], /, **kwargs: _VT@MutableMapping) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], **kwargs: _VT@MutableMapping) -> None
info: rule `no-matching-overload` is enabled by default

error[invalid-assignment]: Object of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))` is not assignable to `(...) -> dict[str, int | float | str | ... omitted 36 union elements]`
   --> src/kfactory/factories/straight.py:128:32
    |
126 |     """
127 |     if callable(additional_info):
128 |         _additional_info_func: Callable[..., dict[str, MetaData]] = additional_info
    |                                ----------------------------------   ^^^^^^^^^^^^^^^ Incompatible value of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))`
    |                                |
    |                                Declared type
129 |         _additional_info: dict[str, MetaData] = {}
130 |     else:
    |
info: rule `invalid-assignment` is enabled by default

error[no-matching-overload]: No overload of bound method `update` matches arguments
   --> src/kfactory/factories/straight.py:212:9
    |
210 |             )
211 |         )
212 |         _info.update(_additional_info)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
213 |         c.info = Info(**_info)
    |
info: First overload defined here
    --> stdlib/typing.pyi:1343:9
     |
1341 |     # -- weakref.WeakKeyDictionary.__ior__
1342 |     @overload
1343 |     def update(self, m: SupportsKeysAndGetItem[_KT, _VT], /) -> None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1344 |         """D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
1345 |         If E present and has a .keys() method, does:     for k in E.keys(): D[k] = E[k]
     |
info: Possible overloads for bound method `update`:
info:   (self, m: SupportsKeysAndGetItem[_KT@MutableMapping, _VT@MutableMapping], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: SupportsKeysAndGetItem[str, _VT@MutableMapping], /, **kwargs: _VT@MutableMapping) -> None
info:   (self, m: Iterable[tuple[_KT@MutableMapping, _VT@MutableMapping]], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: Iterable[tuple[str, _VT@MutableMapping]], /, **kwargs: _VT@MutableMapping) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], **kwargs: _VT@MutableMapping) -> None
info: rule `no-matching-overload` is enabled by default

error[invalid-assignment]: Object of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))` is not assignable to `(...) -> dict[str, int | float | str | ... omitted 36 union elements]`
   --> src/kfactory/factories/taper.py:124:32
    |
122 |       """
123 |       if callable(additional_info) and additional_info is not None:
124 |           _additional_info_func: Callable[
    |  ________________________________-
125 | |             ...,
126 | |             dict[str, MetaData],
127 | |         ] = additional_info
    | |         -   ^^^^^^^^^^^^^^^ Incompatible value of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))`
    | |_________|
    |           Declared type
128 |           _additional_info: dict[str, MetaData] = {}
129 |       else:
    |
info: rule `invalid-assignment` is enabled by default

error[no-matching-overload]: No overload of bound method `update` matches arguments
   --> src/kfactory/factories/taper.py:239:9
    |
237 |             )
238 |         )
239 |         _info.update(_additional_info)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
240 |         c.info = Info(**_info)
241 |         c.auto_rename_ports()
    |
info: First overload defined here
    --> stdlib/typing.pyi:1343:9
     |
1341 |     # -- weakref.WeakKeyDictionary.__ior__
1342 |     @overload
1343 |     def update(self, m: SupportsKeysAndGetItem[_KT, _VT], /) -> None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1344 |         """D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
1345 |         If E present and has a .keys() method, does:     for k in E.keys(): D[k] = E[k]
     |
info: Possible overloads for bound method `update`:
info:   (self, m: SupportsKeysAndGetItem[_KT@MutableMapping, _VT@MutableMapping], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: SupportsKeysAndGetItem[str, _VT@MutableMapping], /, **kwargs: _VT@MutableMapping) -> None
info:   (self, m: Iterable[tuple[_KT@MutableMapping, _VT@MutableMapping]], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: Iterable[tuple[str, _VT@MutableMapping]], /, **kwargs: _VT@MutableMapping) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], **kwargs: _VT@MutableMapping) -> None
info: rule `no-matching-overload` is enabled by default

error[invalid-assignment]: Object of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))` is not assignable to `(...) -> dict[str, int | float | str | ... omitted 36 union elements]`
  --> src/kfactory/factories/virtual/circular.py:69:32
   |
67 |       """
68 |       if callable(additional_info) and additional_info is not None:
69 |           _additional_info_func: Callable[
   |  ________________________________-
70 | |             ...,
71 | |             dict[str, MetaData],
72 | |         ] = additional_info
   | |         -   ^^^^^^^^^^^^^^^ Incompatible value of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))`
   | |_________|
   |           Declared type
73 |           _additional_info: dict[str, MetaData] = {}
74 |       else:
   |
info: rule `invalid-assignment` is enabled by default

error[no-matching-overload]: No overload of bound method `update` matches arguments
   --> src/kfactory/factories/virtual/circular.py:157:9
    |
155 |             )
156 |         )
157 |         _info.update(_additional_info)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
158 |         c.info = Info(**_info)
    |
info: First overload defined here
    --> stdlib/typing.pyi:1343:9
     |
1341 |     # -- weakref.WeakKeyDictionary.__ior__
1342 |     @overload
1343 |     def update(self, m: SupportsKeysAndGetItem[_KT, _VT], /) -> None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1344 |         """D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
1345 |         If E present and has a .keys() method, does:     for k in E.keys(): D[k] = E[k]
     |
info: Possible overloads for bound method `update`:
info:   (self, m: SupportsKeysAndGetItem[_KT@MutableMapping, _VT@MutableMapping], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: SupportsKeysAndGetItem[str, _VT@MutableMapping], /, **kwargs: _VT@MutableMapping) -> None
info:   (self, m: Iterable[tuple[_KT@MutableMapping, _VT@MutableMapping]], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: Iterable[tuple[str, _VT@MutableMapping]], /, **kwargs: _VT@MutableMapping) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], **kwargs: _VT@MutableMapping) -> None
info: rule `no-matching-overload` is enabled by default

error[invalid-assignment]: Object of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))` is not assignable to `(...) -> dict[str, int | float | str | ... omitted 36 union elements]`
  --> src/kfactory/factories/virtual/euler.py:66:32
   |
64 |       """
65 |       if callable(additional_info) and additional_info is not None:
66 |           _additional_info_func: Callable[
   |  ________________________________-
67 | |             ...,
68 | |             dict[str, MetaData],
69 | |         ] = additional_info
   | |         -   ^^^^^^^^^^^^^^^ Incompatible value of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))`
   | |_________|
   |           Declared type
70 |           _additional_info: dict[str, MetaData] = {}
71 |       else:
   |
info: rule `invalid-assignment` is enabled by default

error[no-matching-overload]: No overload of bound method `update` matches arguments
   --> src/kfactory/factories/virtual/euler.py:142:9
    |
140 |             )
141 |         )
142 |         _info.update(_additional_info)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
143 |         c.info = Info(**_info)
    |
info: First overload defined here
    --> stdlib/typing.pyi:1343:9
     |
1341 |     # -- weakref.WeakKeyDictionary.__ior__
1342 |     @overload
1343 |     def update(self, m: SupportsKeysAndGetItem[_KT, _VT], /) -> None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1344 |         """D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
1345 |         If E present and has a .keys() method, does:     for k in E.keys(): D[k] = E[k]
     |
info: Possible overloads for bound method `update`:
info:   (self, m: SupportsKeysAndGetItem[_KT@MutableMapping, _VT@MutableMapping], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: SupportsKeysAndGetItem[str, _VT@MutableMapping], /, **kwargs: _VT@MutableMapping) -> None
info:   (self, m: Iterable[tuple[_KT@MutableMapping, _VT@MutableMapping]], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: Iterable[tuple[str, _VT@MutableMapping]], /, **kwargs: _VT@MutableMapping) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], **kwargs: _VT@MutableMapping) -> None
info: rule `no-matching-overload` is enabled by default

error[invalid-assignment]: Object of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))` is not assignable to `(...) -> dict[str, int | float | str | ... omitted 36 union elements]`
  --> src/kfactory/factories/virtual/straight.py:70:32
   |
68 |       """
69 |       if callable(additional_info) and additional_info is not None:
70 |           _additional_info_func: Callable[
   |  ________________________________-
71 | |             ...,
72 | |             dict[str, MetaData],
73 | |         ] = additional_info
   | |         -   ^^^^^^^^^^^^^^^ Incompatible value of type `(((...) -> dict[str, int | float | str | ... omitted 36 union elements]) & (() -> object)) | (dict[str, int | float | str | ... omitted 36 union elements] & (() -> object))`
   | |_________|
   |           Declared type
74 |           _additional_info: dict[str, MetaData] = {}
75 |       else:
   |
info: rule `invalid-assignment` is enabled by default

error[no-matching-overload]: No overload of bound method `update` matches arguments
   --> src/kfactory/factories/virtual/straight.py:145:9
    |
143 |             )
144 |         )
145 |         _info.update(_additional_info)
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
146 |         c.info = Info(**_info)
    |
info: First overload defined here
    --> stdlib/typing.pyi:1343:9
     |
1341 |     # -- weakref.WeakKeyDictionary.__ior__
1342 |     @overload
1343 |     def update(self, m: SupportsKeysAndGetItem[_KT, _VT], /) -> None:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1344 |         """D.update([E, ]**F) -> None.  Update D from mapping/iterable E and F.
1345 |         If E present and has a .keys() method, does:     for k in E.keys(): D[k] = E[k]
     |
info: Possible overloads for bound method `update`:
info:   (self, m: SupportsKeysAndGetItem[_KT@MutableMapping, _VT@MutableMapping], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: SupportsKeysAndGetItem[str, _VT@MutableMapping], /, **kwargs: _VT@MutableMapping) -> None
info:   (self, m: Iterable[tuple[_KT@MutableMapping, _VT@MutableMapping]], /) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], m: Iterable[tuple[str, _VT@MutableMapping]], /, **kwargs: _VT@MutableMapping) -> None
info:   (self: SupportsGetItem[str, _VT@MutableMapping], **kwargs: _VT@MutableMapping) -> None
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `_standard_trans` matches arguments
   --> src/kfactory/geometry.py:152:24
    |
150 |     def x(self, __val: TUnit, /) -> None:
151 |         """Moves self so that the bbox's center x-coordinate."""
152 |         self.transform(self._standard_trans()(x=__val - self.bbox().center().x))
    |                        ^^^^^^^^^^^^^^^^^^^^^^
153 |
154 |     @property
    |
info: First overload defined here
   --> src/kfactory/geometry.py:130:9
    |
128 |     @overload
129 |     @abstractmethod
130 |     def _standard_trans(self: GeometricObject[int]) -> type[kdb.Trans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 |     @overload
132 |     @abstractmethod
    |
info: Possible overloads for bound method `_standard_trans`:
info:   (self: GeometricObject[int]) -> type[Trans]
info:   (self: GeometricObject[int | float]) -> type[DCplxTrans]
info: Overload implementation defined here
   --> src/kfactory/geometry.py:135:9
    |
133 |     def _standard_trans(self: GeometricObject[float]) -> type[kdb.DCplxTrans]: ...
134 |     @abstractmethod
135 |     def _standard_trans(self) -> type[kdb.Trans | kdb.DCplxTrans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 |
137 |     @abstractmethod
    |
info: rule `no-matching-overload` is enabled by default

error[unsupported-operator]: Operator `-` is unsupported between objects of type `TUnit@GeometricObject` and `Unknown | TUnit@GeometricObject`
   --> src/kfactory/geometry.py:152:49
    |
150 |     def x(self, __val: TUnit, /) -> None:
151 |         """Moves self so that the bbox's center x-coordinate."""
152 |         self.transform(self._standard_trans()(x=__val - self.bbox().center().x))
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
153 |
154 |     @property
    |
info: rule `unsupported-operator` is enabled by default

error[no-matching-overload]: No overload of bound method `_standard_trans` matches arguments
   --> src/kfactory/geometry.py:162:24
    |
160 |     def y(self, __val: TUnit, /) -> None:
161 |         """Moves self so that the bbox's center y-coordinate."""
162 |         self.transform(self._standard_trans()(y=__val - self.bbox().center().y))
    |                        ^^^^^^^^^^^^^^^^^^^^^^
163 |
164 |     @property
    |
info: First overload defined here
   --> src/kfactory/geometry.py:130:9
    |
128 |     @overload
129 |     @abstractmethod
130 |     def _standard_trans(self: GeometricObject[int]) -> type[kdb.Trans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 |     @overload
132 |     @abstractmethod
    |
info: Possible overloads for bound method `_standard_trans`:
info:   (self: GeometricObject[int]) -> type[Trans]
info:   (self: GeometricObject[int | float]) -> type[DCplxTrans]
info: Overload implementation defined here
   --> src/kfactory/geometry.py:135:9
    |
133 |     def _standard_trans(self: GeometricObject[float]) -> type[kdb.DCplxTrans]: ...
134 |     @abstractmethod
135 |     def _standard_trans(self) -> type[kdb.Trans | kdb.DCplxTrans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 |
137 |     @abstractmethod
    |
info: rule `no-matching-overload` is enabled by default

error[unsupported-operator]: Operator `-` is unsupported between objects of type `TUnit@GeometricObject` and `Unknown | TUnit@GeometricObject`
   --> src/kfactory/geometry.py:162:49
    |
160 |     def y(self, __val: TUnit, /) -> None:
161 |         """Moves self so that the bbox's center y-coordinate."""
162 |         self.transform(self._standard_trans()(y=__val - self.bbox().center().y))
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
163 |
164 |     @property
    |
info: rule `unsupported-operator` is enabled by default

error[no-matching-overload]: No overload of bound method `_standard_trans` matches arguments
   --> src/kfactory/geometry.py:172:24
    |
170 |     def xmin(self, __val: TUnit, /) -> None:
171 |         """Moves self so that the bbox's left edge x-coordinate."""
172 |         self.transform(self._standard_trans()(x=__val - self.bbox().left))
    |                        ^^^^^^^^^^^^^^^^^^^^^^
173 |
174 |     @property
    |
info: First overload defined here
   --> src/kfactory/geometry.py:130:9
    |
128 |     @overload
129 |     @abstractmethod
130 |     def _standard_trans(self: GeometricObject[int]) -> type[kdb.Trans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 |     @overload
132 |     @abstractmethod
    |
info: Possible overloads for bound method `_standard_trans`:
info:   (self: GeometricObject[int]) -> type[Trans]
info:   (self: GeometricObject[int | float]) -> type[DCplxTrans]
info: Overload implementation defined here
   --> src/kfactory/geometry.py:135:9
    |
133 |     def _standard_trans(self: GeometricObject[float]) -> type[kdb.DCplxTrans]: ...
134 |     @abstractmethod
135 |     def _standard_trans(self) -> type[kdb.Trans | kdb.DCplxTrans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 |
137 |     @abstractmethod
    |
info: rule `no-matching-overload` is enabled by default

error[unsupported-operator]: Operator `-` is unsupported between objects of type `TUnit@GeometricObject` and `Unknown | TUnit@GeometricObject`
   --> src/kfactory/geometry.py:172:49
    |
170 |     def xmin(self, __val: TUnit, /) -> None:
171 |         """Moves self so that the bbox's left edge x-coordinate."""
172 |         self.transform(self._standard_trans()(x=__val - self.bbox().left))
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^
173 |
174 |     @property
    |
info: rule `unsupported-operator` is enabled by default

error[no-matching-overload]: No overload of bound method `_standard_trans` matches arguments
   --> src/kfactory/geometry.py:182:24
    |
180 |     def ymin(self, __val: TUnit, /) -> None:
181 |         """Moves self so that the bbox's bottom edge y-coordinate."""
182 |         self.transform(self._standard_trans()(y=__val - self.bbox().bottom))
    |                        ^^^^^^^^^^^^^^^^^^^^^^
183 |
184 |     @property
    |
info: First overload defined here
   --> src/kfactory/geometry.py:130:9
    |
128 |     @overload
129 |     @abstractmethod
130 |     def _standard_trans(self: GeometricObject[int]) -> type[kdb.Trans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 |     @overload
132 |     @abstractmethod
    |
info: Possible overloads for bound method `_standard_trans`:
info:   (self: GeometricObject[int]) -> type[Trans]
info:   (self: GeometricObject[int | float]) -> type[DCplxTrans]
info: Overload implementation defined here
   --> src/kfactory/geometry.py:135:9
    |
133 |     def _standard_trans(self: GeometricObject[float]) -> type[kdb.DCplxTrans]: ...
134 |     @abstractmethod
135 |     def _standard_trans(self) -> type[kdb.Trans | kdb.DCplxTrans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 |
137 |     @abstractmethod
    |
info: rule `no-matching-overload` is enabled by default

error[unsupported-operator]: Operator `-` is unsupported between objects of type `TUnit@GeometricObject` and `Unknown | TUnit@GeometricObject`
   --> src/kfactory/geometry.py:182:49
    |
180 |     def ymin(self, __val: TUnit, /) -> None:
181 |         """Moves self so that the bbox's bottom edge y-coordinate."""
182 |         self.transform(self._standard_trans()(y=__val - self.bbox().bottom))
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
183 |
184 |     @property
    |
info: rule `unsupported-operator` is enabled by default

error[no-matching-overload]: No overload of bound method `_standard_trans` matches arguments
   --> src/kfactory/geometry.py:192:24
    |
190 |     def xmax(self, __val: TUnit, /) -> None:
191 |         """Moves self so that the bbox's right edge x-coordinate."""
192 |         self.transform(self._standard_trans()(x=__val - self.bbox().right))
    |                        ^^^^^^^^^^^^^^^^^^^^^^
193 |
194 |     @property
    |
info: First overload defined here
   --> src/kfactory/geometry.py:130:9
    |
128 |     @overload
129 |     @abstractmethod
130 |     def _standard_trans(self: GeometricObject[int]) -> type[kdb.Trans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 |     @overload
132 |     @abstractmethod
    |
info: Possible overloads for bound method `_standard_trans`:
info:   (self: GeometricObject[int]) -> type[Trans]
info:   (self: GeometricObject[int | float]) -> type[DCplxTrans]
info: Overload implementation defined here
   --> src/kfactory/geometry.py:135:9
    |
133 |     def _standard_trans(self: GeometricObject[float]) -> type[kdb.DCplxTrans]: ...
134 |     @abstractmethod
135 |     def _standard_trans(self) -> type[kdb.Trans | kdb.DCplxTrans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 |
137 |     @abstractmethod
    |
info: rule `no-matching-overload` is enabled by default

error[unsupported-operator]: Operator `-` is unsupported between objects of type `TUnit@GeometricObject` and `Unknown | TUnit@GeometricObject`
   --> src/kfactory/geometry.py:192:49
    |
190 |     def xmax(self, __val: TUnit, /) -> None:
191 |         """Moves self so that the bbox's right edge x-coordinate."""
192 |         self.transform(self._standard_trans()(x=__val - self.bbox().right))
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^
193 |
194 |     @property
    |
info: rule `unsupported-operator` is enabled by default

error[no-matching-overload]: No overload of bound method `_standard_trans` matches arguments
   --> src/kfactory/geometry.py:202:24
    |
200 |     def ymax(self, __val: TUnit, /) -> None:
201 |         """Moves self so that the bbox's top edge y-coordinate."""
202 |         self.transform(self._standard_trans()(y=__val - self.bbox().top))
    |                        ^^^^^^^^^^^^^^^^^^^^^^
203 |
204 |     @property
    |
info: First overload defined here
   --> src/kfactory/geometry.py:130:9
    |
128 |     @overload
129 |     @abstractmethod
130 |     def _standard_trans(self: GeometricObject[int]) -> type[kdb.Trans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 |     @overload
132 |     @abstractmethod
    |
info: Possible overloads for bound method `_standard_trans`:
info:   (self: GeometricObject[int]) -> type[Trans]
info:   (self: GeometricObject[int | float]) -> type[DCplxTrans]
info: Overload implementation defined here
   --> src/kfactory/geometry.py:135:9
    |
133 |     def _standard_trans(self: GeometricObject[float]) -> type[kdb.DCplxTrans]: ...
134 |     @abstractmethod
135 |     def _standard_trans(self) -> type[kdb.Trans | kdb.DCplxTrans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 |
137 |     @abstractmethod
    |
info: rule `no-matching-overload` is enabled by default

error[unsupported-operator]: Operator `-` is unsupported between objects of type `TUnit@GeometricObject` and `Unknown | TUnit@GeometricObject`
   --> src/kfactory/geometry.py:202:49
    |
200 |     def ymax(self, __val: TUnit, /) -> None:
201 |         """Moves self so that the bbox's top edge y-coordinate."""
202 |         self.transform(self._standard_trans()(y=__val - self.bbox().top))
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^
203 |
204 |     @property
    |
info: rule `unsupported-operator` is enabled by default

error[no-matching-overload]: No overload of bound method `_standard_trans` matches arguments
   --> src/kfactory/geometry.py:212:24
    |
210 |     def xsize(self, __val: TUnit, /) -> None:
211 |         """Sets the width of the bounding box."""
212 |         self.transform(self._standard_trans()(x=__val - self.bbox().width()))
    |                        ^^^^^^^^^^^^^^^^^^^^^^
213 |
214 |     @property
    |
info: First overload defined here
   --> src/kfactory/geometry.py:130:9
    |
128 |     @overload
129 |     @abstractmethod
130 |     def _standard_trans(self: GeometricObject[int]) -> type[kdb.Trans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 |     @overload
132 |     @abstractmethod
    |
info: Possible overloads for bound method `_standard_trans`:
info:   (self: GeometricObject[int]) -> type[Trans]
info:   (self: GeometricObject[int | float]) -> type[DCplxTrans]
info: Overload implementation defined here
   --> src/kfactory/geometry.py:135:9
    |
133 |     def _standard_trans(self: GeometricObject[float]) -> type[kdb.DCplxTrans]: ...
134 |     @abstractmethod
135 |     def _standard_trans(self) -> type[kdb.Trans | kdb.DCplxTrans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 |
137 |     @abstractmethod
    |
info: rule `no-matching-overload` is enabled by default

error[unsupported-operator]: Operator `-` is unsupported between objects of type `TUnit@GeometricObject` and `TUnit@GeometricObject`
   --> src/kfactory/geometry.py:212:49
    |
210 |     def xsize(self, __val: TUnit, /) -> None:
211 |         """Sets the width of the bounding box."""
212 |         self.transform(self._standard_trans()(x=__val - self.bbox().width()))
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
213 |
214 |     @property
    |
info: rule `unsupported-operator` is enabled by default

error[no-matching-overload]: No overload of bound method `_standard_trans` matches arguments
   --> src/kfactory/geometry.py:222:24
    |
220 |     def ysize(self, __val: TUnit, /) -> None:
221 |         """Sets the height of the bounding box."""
222 |         self.transform(self._standard_trans()(y=__val - self.bbox().height()))
    |                        ^^^^^^^^^^^^^^^^^^^^^^
223 |
224 |     @property
    |
info: First overload defined here
   --> src/kfactory/geometry.py:130:9
    |
128 |     @overload
129 |     @abstractmethod
130 |     def _standard_trans(self: GeometricObject[int]) -> type[kdb.Trans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 |     @overload
132 |     @abstractmethod
    |
info: Possible overloads for bound method `_standard_trans`:
info:   (self: GeometricObject[int]) -> type[Trans]
info:   (self: GeometricObject[int | float]) -> type[DCplxTrans]
info: Overload implementation defined here
   --> src/kfactory/geometry.py:135:9
    |
133 |     def _standard_trans(self: GeometricObject[float]) -> type[kdb.DCplxTrans]: ...
134 |     @abstractmethod
135 |     def _standard_trans(self) -> type[kdb.Trans | kdb.DCplxTrans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 |
137 |     @abstractmethod
    |
info: rule `no-matching-overload` is enabled by default

error[unsupported-operator]: Operator `-` is unsupported between objects of type `TUnit@GeometricObject` and `TUnit@GeometricObject`
   --> src/kfactory/geometry.py:222:49
    |
220 |     def ysize(self, __val: TUnit, /) -> None:
221 |         """Sets the height of the bounding box."""
222 |         self.transform(self._standard_trans()(y=__val - self.bbox().height()))
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
223 |
224 |     @property
    |
info: rule `unsupported-operator` is enabled by default

error[no-matching-overload]: No overload of bound method `_standard_trans` matches arguments
   --> src/kfactory/geometry.py:234:13
    |
232 |         """Moves self so that the bbox's center coordinate."""
233 |         self.transform(
234 |             self._standard_trans()(
    |             ^^^^^^^^^^^^^^^^^^^^^^
235 |                 __val[0] - self.bbox().center().x, __val[1] - self.bbox().center().y
236 |             )
    |
info: First overload defined here
   --> src/kfactory/geometry.py:130:9
    |
128 |     @overload
129 |     @abstractmethod
130 |     def _standard_trans(self: GeometricObject[int]) -> type[kdb.Trans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 |     @overload
132 |     @abstractmethod
    |
info: Possible overloads for bound method `_standard_trans`:
info:   (self: GeometricObject[int]) -> type[Trans]
info:   (self: GeometricObject[int | float]) -> type[DCplxTrans]
info: Overload implementation defined here
   --> src/kfactory/geometry.py:135:9
    |
133 |     def _standard_trans(self: GeometricObject[float]) -> type[kdb.DCplxTrans]: ...
134 |     @abstractmethod
135 |     def _standard_trans(self) -> type[kdb.Trans | kdb.DCplxTrans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 |
137 |     @abstractmethod
    |
info: rule `no-matching-overload` is enabled by default

error[unsupported-operator]: Operator `-` is unsupported between objects of type `TUnit@GeometricObject` and `Unknown | TUnit@GeometricObject`
   --> src/kfactory/geometry.py:235:17
    |
233 |         self.transform(
234 |             self._standard_trans()(
235 |                 __val[0] - self.bbox().center().x, __val[1] - self.bbox().center().y
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
236 |             )
237 |         )
    |
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Operator `-` is unsupported between objects of type `TUnit@GeometricObject` and `Unknown | TUnit@GeometricObject`
   --> src/kfactory/geometry.py:235:52
    |
233 |         self.transform(
234 |             self._standard_trans()(
235 |                 __val[0] - self.bbox().center().x, __val[1] - self.bbox().center().y
    |                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
236 |             )
237 |         )
    |
info: rule `unsupported-operator` is enabled by default

error[no-matching-overload]: No overload of bound method `_standard_trans` matches arguments
   --> src/kfactory/geometry.py:259:28
    |
257 |         """
258 |         if destination is None:
259 |             self.transform(self._standard_trans()(*origin))
    |                            ^^^^^^^^^^^^^^^^^^^^^^
260 |         else:
261 |             self.transform(
    |
info: First overload defined here
   --> src/kfactory/geometry.py:130:9
    |
128 |     @overload
129 |     @abstractmethod
130 |     def _standard_trans(self: GeometricObject[int]) -> type[kdb.Trans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 |     @overload
132 |     @abstractmethod
    |
info: Possible overloads for bound method `_standard_trans`:
info:   (self: GeometricObject[int]) -> type[Trans]
info:   (self: GeometricObject[int | float]) -> type[DCplxTrans]
info: Overload implementation defined here
   --> src/kfactory/geometry.py:135:9
    |
133 |     def _standard_trans(self: GeometricObject[float]) -> type[kdb.DCplxTrans]: ...
134 |     @abstractmethod
135 |     def _standard_trans(self) -> type[kdb.Trans | kdb.DCplxTrans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 |
137 |     @abstractmethod
    |
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `_standard_trans` matches arguments
   --> src/kfactory/geometry.py:262:17
    |
260 |         else:
261 |             self.transform(
262 |                 self._standard_trans()(
    |                 ^^^^^^^^^^^^^^^^^^^^^^
263 |                     destination[0] - origin[0], destination[1] - origin[1]
264 |                 )
    |
info: First overload defined here
   --> src/kfactory/geometry.py:130:9
    |
128 |     @overload
129 |     @abstractmethod
130 |     def _standard_trans(self: GeometricObject[int]) -> type[kdb.Trans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 |     @overload
132 |     @abstractmethod
    |
info: Possible overloads for bound method `_standard_trans`:
info:   (self: GeometricObject[int]) -> type[Trans]
info:   (self: GeometricObject[int | float]) -> type[DCplxTrans]
info: Overload implementation defined here
   --> src/kfactory/geometry.py:135:9
    |
133 |     def _standard_trans(self: GeometricObject[float]) -> type[kdb.DCplxTrans]: ...
134 |     @abstractmethod
135 |     def _standard_trans(self) -> type[kdb.Trans | kdb.DCplxTrans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 |
137 |     @abstractmethod
    |
info: rule `no-matching-overload` is enabled by default

error[unsupported-operator]: Operator `-` is unsupported between objects of type `TUnit@GeometricObject` and `TUnit@GeometricObject`
   --> src/kfactory/geometry.py:263:21
    |
261 |             self.transform(
262 |                 self._standard_trans()(
263 |                     destination[0] - origin[0], destination[1] - origin[1]
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
264 |                 )
265 |             )
    |
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Operator `-` is unsupported between objects of type `TUnit@GeometricObject` and `TUnit@GeometricObject`
   --> src/kfactory/geometry.py:263:49
    |
261 |             self.transform(
262 |                 self._standard_trans()(
263 |                     destination[0] - origin[0], destination[1] - origin[1]
    |                                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
264 |                 )
265 |             )
    |
info: rule `unsupported-operator` is enabled by default

error[no-matching-overload]: No overload of bound method `_standard_trans` matches arguments
   --> src/kfactory/geometry.py:282:28
    |
280 |         """
281 |         if destination is None:
282 |             self.transform(self._standard_trans()(x=origin))
    |                            ^^^^^^^^^^^^^^^^^^^^^^
283 |         else:
284 |             self.transform(self._standard_trans()(x=destination - origin))
    |
info: First overload defined here
   --> src/kfactory/geometry.py:130:9
    |
128 |     @overload
129 |     @abstractmethod
130 |     def _standard_trans(self: GeometricObject[int]) -> type[kdb.Trans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 |     @overload
132 |     @abstractmethod
    |
info: Possible overloads for bound method `_standard_trans`:
info:   (self: GeometricObject[int]) -> type[Trans]
info:   (self: GeometricObject[int | float]) -> type[DCplxTrans]
info: Overload implementation defined here
   --> src/kfactory/geometry.py:135:9
    |
133 |     def _standard_trans(self: GeometricObject[float]) -> type[kdb.DCplxTrans]: ...
134 |     @abstractmethod
135 |     def _standard_trans(self) -> type[kdb.Trans | kdb.DCplxTrans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 |
137 |     @abstractmethod
    |
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `_standard_trans` matches arguments
   --> src/kfactory/geometry.py:284:28
    |
282 |             self.transform(self._standard_trans()(x=origin))
283 |         else:
284 |             self.transform(self._standard_trans()(x=destination - origin))
    |                            ^^^^^^^^^^^^^^^^^^^^^^
285 |         return self
    |
info: First overload defined here
   --> src/kfactory/geometry.py:130:9
    |
128 |     @overload
129 |     @abstractmethod
130 |     def _standard_trans(self: GeometricObject[int]) -> type[kdb.Trans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 |     @overload
132 |     @abstractmethod
    |
info: Possible overloads for bound method `_standard_trans`:
info:   (self: GeometricObject[int]) -> type[Trans]
info:   (self: GeometricObject[int | float]) -> type[DCplxTrans]
info: Overload implementation defined here
   --> src/kfactory/geometry.py:135:9
    |
133 |     def _standard_trans(self: GeometricObject[float]) -> type[kdb.DCplxTrans]: ...
134 |     @abstractmethod
135 |     def _standard_trans(self) -> type[kdb.Trans | kdb.DCplxTrans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 |
137 |     @abstractmethod
    |
info: rule `no-matching-overload` is enabled by default

error[unsupported-operator]: Operator `-` is unsupported between objects of type `TUnit@GeometricObject` and `TUnit@GeometricObject`
   --> src/kfactory/geometry.py:284:53
    |
282 |             self.transform(self._standard_trans()(x=origin))
283 |         else:
284 |             self.transform(self._standard_trans()(x=destination - origin))
    |                                                     ^^^^^^^^^^^^^^^^^^^^
285 |         return self
    |
info: rule `unsupported-operator` is enabled by default

error[no-matching-overload]: No overload of bound method `_standard_trans` matches arguments
   --> src/kfactory/geometry.py:301:28
    |
299 |         """
300 |         if destination is None:
301 |             self.transform(self._standard_trans()(y=origin))
    |                            ^^^^^^^^^^^^^^^^^^^^^^
302 |         else:
303 |             self.transform(self._standard_trans()(y=destination - origin))
    |
info: First overload defined here
   --> src/kfactory/geometry.py:130:9
    |
128 |     @overload
129 |     @abstractmethod
130 |     def _standard_trans(self: GeometricObject[int]) -> type[kdb.Trans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 |     @overload
132 |     @abstractmethod
    |
info: Possible overloads for bound method `_standard_trans`:
info:   (self: GeometricObject[int]) -> type[Trans]
info:   (self: GeometricObject[int | float]) -> type[DCplxTrans]
info: Overload implementation defined here
   --> src/kfactory/geometry.py:135:9
    |
133 |     def _standard_trans(self: GeometricObject[float]) -> type[kdb.DCplxTrans]: ...
134 |     @abstractmethod
135 |     def _standard_trans(self) -> type[kdb.Trans | kdb.DCplxTrans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 |
137 |     @abstractmethod
    |
info: rule `no-matching-overload` is enabled by default

error[no-matching-overload]: No overload of bound method `_standard_trans` matches arguments
   --> src/kfactory/geometry.py:303:28
    |
301 |             self.transform(self._standard_trans()(y=origin))
302 |         else:
303 |             self.transform(self._standard_trans()(y=destination - origin))
    |                            ^^^^^^^^^^^^^^^^^^^^^^
304 |         return self
    |
info: First overload defined here
   --> src/kfactory/geometry.py:130:9
    |
128 |     @overload
129 |     @abstractmethod
130 |     def _standard_trans(self: GeometricObject[int]) -> type[kdb.Trans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131 |     @overload
132 |     @abstractmethod
    |
info: Possible overloads for bound method `_standard_trans`:
info:   (self: GeometricObject[int]) -> type[Trans]
info:   (self: GeometricObject[int | float]) -> type[DCplxTrans]
info: Overload implementation defined here
   --> src/kfactory/geometry.py:135:9
    |
133 |     def _standard_trans(self: GeometricObject[float]) -> type[kdb.DCplxTrans]: ...
134 |     @abstractmethod
135 |     def _standard_trans(self) -> type[kdb.Trans | kdb.DCplxTrans]: ...
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136 |
137 |     @abstractmethod
    |
info: rule `no-matching-overload` is enabled by default

error[unsupported-operator]: Operator `-` is unsupported between objects of type `TUnit@GeometricObject` and `TUnit@GeometricObject`
   --> src/kfactory/geometry.py:303:53
    |
301 |             self.transform(self._standard_trans()(y=origin))
302 |         else:
303 |             self.transform(self._standard_trans()(y=destination - origin))
    |                                                     ^^^^^^^^^^^^^^^^^^^^
304 |         return self
    |
info: rule `unsupported-operator` is enabled by default

error[invalid-method-override]: Invalid override of method `_standard_trans`
   --> src/kfactory/geometry.py:759:9
    |
757 |         return self.ibbox(layer)
758 |
759 |     def _standard_trans(self) -> type[kdb.Trans]:
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `GeometricObject._standard_trans`
760 |         return kdb.Trans
    |
   ::: src/kfactory/geometry.py:135:9
    |
133 |     def _standard_trans(self: GeometricObject[float]) -> type[kdb.DCplxTrans]: ...
134 |     @abstractmethod
135 |     def _standard_trans(self) -> type[kdb.Trans | kdb.DCplxTrans]: ...
    |         --------------------------------------------------------- `GeometricObject._standard_trans` defined here
136 |
137 |     @abstractmethod
    |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-method-override]: Invalid override of method `_standard_trans`
   --> src/kfactory/geometry.py:781:9
    |
779 |         return self.dbbox(layer)
780 |
781 |     def _standard_trans(self) -> type[kdb.DCplxTrans]:
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Definition is incompatible with `GeometricObject._standard_trans`
782 |         return kdb.DCplxTrans
    |
   ::: src/kfactory/geometry.py:135:9
    |
133 |     def _standard_trans(self: GeometricObject[float]) -> type[kdb.DCplxTrans]: ...
134 |     @abstractmethod
135 |     def _standard_trans(self) -> type[kdb.Trans | kdb.DCplxTrans]: ...
    |         --------------------------------------------------------- `GeometricObject._standard_trans` defined here
136 |
137 |     @abstractmethod
    |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

warning[possibly-missing-attribute]: Attribute `is_integer` may be missing on object of type `(int & ~Literal[0]) | float`
   --> src/kfactory/instance.py:136:16
    |
134 |         name = f"{self.cell.name}_{self.trans.disp.x}_{self.trans.disp.y}"
135 |         if self.cplx_trans.angle != 0:
136 |             if self.cplx_trans.angle.is_integer():
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
137 |                 name += f"_A{int(self.cplx_trans.angle)}"
138 |             else:
    |
info: rule `possibly-missing-attribute` is enabled by default

error[unresolved-attribute]: Object of type `object` has no attribute `items`
   --> src/kfactory/instance.py:930:38
    |
928 |                     cell.shapes(layer).insert(reg)
929 |             else:
930 |                 for layer, shapes in self.cell._shapes.items():
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^
931 |                     for shape in shapes.transform(trans * self.trans):
932 |                         cell.shapes(layer).insert(shape)
    |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to class `property` is incorrect
   --> src/kfactory/kcell.py:695:5
    |
693 |         return self._base.virtual
694 |
695 |     @property
    |     ^^^^^^^^^ Expected `((Any, /) -> Any) | None`, found `property`
696 |     @property
697 |     @abstractmethod
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `YAML` has no attribute `dumps`
    --> src/kfactory/kcell.py:1420:27
     |
1418 |                     err_msg += (
1419 |                         "\nLayout Meta Diff:\n```\n"
1420 |                         + yaml.dumps(dict(diff.layout_meta_diff))
     |                           ^^^^^^^^^^
1421 |                         + "\n```"
1422 |                     )
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `YAML` has no attribute `dumps`
    --> src/kfactory/kcell.py:1427:27
     |
1425 |                     err_msg += (
1426 |                         "\nLayout Meta Diff:\n```\n"
1427 |                         + yaml.dumps(dict(diff.cells_meta_diff))
     |                           ^^^^^^^^^^
1428 |                         + "\n```"
1429 |                     )
     |
info: rule `unresolved-attribute` is enabled by default

error[no-matching-overload]: No overload of bound method `transform` matches arguments
    --> src/kfactory/kcell.py:1547:17
     |
1545 |               return Instance(
1546 |                   self.kcl,
1547 | /                 self._base.kdb_cell.transform(
1548 | |                     inst_or_trans,  # type: ignore[arg-type]
1549 | |                     trans,  # type: ignore[arg-type]
1550 | |                 ),
     | |_________________^
1551 |               )
1552 |           self._base.kdb_cell.transform(inst_or_trans)  # type:ignore[arg-type]
     |
info: First overload defined here
    --> .venv/lib/python3.12/site-packages/klayout/dbcore.pyi:2875:9
     |
2873 |         ...
2874 |     @overload
2875 |     def transform(self, instance: Instance, trans: DCplxTrans) -> Instance:
     |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2876 |         r"""
2877 |         @brief Transforms the instance with the given complex floating-point transformation given in micrometer units
     |
info: Possible overloads for bound method `transform`:
info:   (self, instance: Instance, trans: DCplxTrans) -> Instance
info:   (self, instance: Instance, trans: DTrans) -> Instance
info:   (self, instance: Instance, trans: ICplxTrans) -> Instance
info:   (self, instance: Instance, trans: Trans) -> Instance
info:   (self, trans: DCplxTrans) -> None
info:   (self, trans: DTrans) -> None
info:   (self, trans: ICplxTrans) -> None
info:   (self, trans: Trans) -> None
info: rule `no-matching-overload` is enabled by default

error[invalid-method-override]: Invalid override of method `create_inst`
    --> src/kfactory/kcell.py:2917:9
     |
2915 |           return self.ports[key]
2916 |
2917 |       def create_inst(
     |  _________^
2918 | |         self,
2919 | |         cell: ProtoTKCell[Any] | int,
2920 | |         trans: kdb.DTrans | kdb.DVector | kdb.DCplxTrans | None = None,
2921 | |         *,
2922 | |         a: kdb.DVector | None = None,
2923 | |         b: kdb.DVector | None = None,
2924 | |         na: int = 1,
2925 | |         nb: int = 1,
2926 | |         libcell_as_static: bool = False,
2927 | |         static_name_separator: str = "__",
2928 | |     ) -> DInstance:
     | |__________________^ Definition is incompatible with `ProtoTKCell.create_inst`
2929 |           return DInstance(
2930 |               kcl=self.kcl,
     |
    ::: src/kfactory/kcell.py:947:9
     |
 946 |       @abstractmethod
 947 |       def create_inst(
     |  _________-
 948 | |         self,
 949 | |         cell: ProtoTKCell[Any] | int,
 950 | |         trans: kdb.Trans
 951 | |         | kdb.Vector
 952 | |         | kdb.ICplxTrans
 953 | |         | kdb.DTrans
 954 | |         | kdb.DVector
 955 | |         | kdb.DCplxTrans
 956 | |         | None = None,
 957 | |         *,
 958 | |         a: kdb.Vector | kdb.DVector | None = None,
 959 | |         b: kdb.Vector | kdb.DVector | None = None,
 960 | |         na: int = 1,
 961 | |         nb: int = 1,
 962 | |         libcell_as_static: bool = False,
 963 | |         static_name_separator: str = "__",
 964 | |     ) -> Instance | DInstance: ...
     | |_____________________________- `ProtoTKCell.create_inst` defined here
 965 |
 966 |       def _get_ci(
     |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> src/kfactory/kcell.py:2963:40
     |
2961 |             return DCrossSection(
2962 |                 kcl=self.kcl,
2963 |                 name=cross_section.get("name"),
     |                                        ^^^^^^ Expected `Never`, found `Literal["name"]`
2964 |                 **cross_section["settings"],
2965 |             )
     |
info: Matching overload defined here
    --> stdlib/builtins.pyi:2988:9
     |
2986 |     # Positional-only in dict, but not in MutableMapping
2987 |     @overload  # type: ignore[override]
2988 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
2989 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   (self, key: _KT@dict, default: _T@get, /) -> _VT@dict | _T@get
info: Union variant `Overload[(key: Never, default: None = None, /) -> object, (key: Never, default: Never, /) -> object, (key: Never, default: _T@get, /) -> object]` is incompatible with this call site
info: Attempted to call union type `(Overload[(key: str, default: None = None, /) -> Any | None, (key: str, default: Any, /) -> Any, (key: str, default: _T@get, /) -> Any | _T@get]) | (Overload[(key: Never, default: None = None, /) -> object, (key: Never, default: Never, /) -> object, (key: Never, default: _T@get, /) -> object])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-method-override]: Invalid override of method `create_inst`
    --> src/kfactory/kcell.py:3121:9
     |
3119 |           return self.ports[key]
3120 |
3121 |       def create_inst(
     |  _________^
3122 | |         self,
3123 | |         cell: AnyTKCell | int,
3124 | |         trans: kdb.Trans | kdb.Vector | kdb.ICplxTrans | None = None,
3125 | |         *,
3126 | |         a: kdb.Vector | None = None,
3127 | |         b: kdb.Vector | None = None,
3128 | |         na: int = 1,
3129 | |         nb: int = 1,
3130 | |         libcell_as_static: bool = False,
3131 | |         static_name_separator: str = "__",
3132 | |     ) -> Instance:
     | |_________________^ Definition is incompatible with `ProtoTKCell.create_inst`
3133 |           return Instance(
3134 |               kcl=self.kcl,
     |
    ::: src/kfactory/kcell.py:947:9
     |
 946 |       @abstractmethod
 947 |       def create_inst(
     |  _________-
 948 | |         self,
 949 | |         cell: ProtoTKCell[Any] | int,
 950 | |         trans: kdb.Trans
 951 | |         | kdb.Vector
 952 | |         | kdb.ICplxTrans
 953 | |         | kdb.DTrans
 954 | |         | kdb.DVector
 955 | |         | kdb.DCplxTrans
 956 | |         | None = None,
 957 | |         *,
 958 | |         a: kdb.Vector | kdb.DVector | None = None,
 959 | |         b: kdb.Vector | kdb.DVector | None = None,
 960 | |         na: int = 1,
 961 | |         nb: int = 1,
 962 | |         libcell_as_static: bool = False,
 963 | |         static_name_separator: str = "__",
 964 | |     ) -> Instance | DInstance: ...
     | |_____________________________- `ProtoTKCell.create_inst` defined here
 965 |
 966 |       def _get_ci(
     |
info: This violates the Liskov Substitution Principle
info: rule `invalid-method-override` is enabled by default

error[invalid-argument-type]: Argument to bound method `get` is incorrect
    --> src/kfactory/kcell.py:3434:40
     |
3432 |             return CrossSection(
3433 |                 kcl=self.kcl,
3434 |                 name=cross_section.get("name"),
     |                                        ^^^^^^ Expected `Never`, found `Literal["name"]`
3435 |                 **cross_section["settings"],
3436 |             )
     |
info: Matching overload defined here
    --> stdlib/builtins.pyi:2988:9
     |
2986 |     # Positional-only in dict, but not in MutableMapping
2987 |     @overload  # type: ignore[override]
2988 |     def get(self, key: _KT, default: None = None, /) -> _VT | None:
     |         ^^^       -------- Parameter declared here
2989 |         """Return the value for key if key is in the dictionary, else default."""
     |
info: Non-matching overloads for bound method `get`:
info:   (self, key: _KT@dict, default: _VT@dict, /) -> _VT@dict
info:   (self, key: _KT@dict, default: _T@get, /) -> _VT@dict | _T@get
info: Union variant `Overload[(key: Never, default: None = None, /) -> object, (key: Never, default: Never, /) -> object, (key: Never, default: _T@get, /) -> object]` is incompatible with this call site
info: Attempted to call union type `(Overload[(key: str, default: None = None, /) -> Any | None, (key: str, default: Any, /) -> Any, (key: str, default: _T@get, /) -> Any | _T@get]) | (Overload[(key: Never, default: None = None, /) -> object, (key: Never, default: Never, /) -> object, (key: Never, default: _T@get, /) -> object])`
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `clean_name` is incorrect
    --> src/kfactory/kcell.py:3859:31
     |
3857 |             from __main__ import __file__ as mf
3858 |
3859 |             name = clean_name(mf)
     |                               ^^ Expected `str`, found `str | None`
3860 |         except ImportError:
3861 |             name = "shell"
     |
info: Element `None` of this union is not assignable to `str`
info: Function defined here
  --> src/kfactory/serialization.py:47:5
   |
47 | def clean_name(name: str) -> str:
   |     ^^^^^^^^^^ --------- Parameter declared here
48 |     r"""Ensures that gds cells are composed of [a-zA-Z0-9_\-].
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-return-type]: Return type does not match returned value
   --> src/kfactory/layer.py:274:12
    |
272 |       for li in layers.model_dump().values():
273 |           members[li.name] = li.layer, li.datatype
274 |       return LayerEnum(
    |  ____________^
275 | |         name,  # type: ignore[arg-type]
276 | |         members,  # type: ignore[arg-type]
277 | |     )
    | |_____^ expected `type[LayerEnum]`, found `LayerEnum`
    |
   ::: src/kfactory/layer.py:266:6
    |
264 |       name: str = "LAYER",
265 |       layout: kdb.Layout | None = None,
266 |   ) -> type[LayerEnum]:
    |        --------------- Expected `type[LayerEnum]` because of return type
267 |       from .layout import get_default_kcl
    |
info: rule `invalid-return-type` is enabled by default

error[unresolved-attribute]: Object of type `(**KCellParams@cell) -> KCIN@decorator_autocell` has no attribute `__globals__`
    --> src/kfactory/layout.py:1294:61
     |
1292 |                 # Use get_type_hints to resolve string annotations
1293 |                 try:
1294 |                     type_hints = get_type_hints(f, globalns=f.__globals__)
     |                                                             ^^^^^^^^^^^^^
1295 |                     output_cell_type_ = type_hints.get("return", sig.return_annotation)
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `(**KCellParams@vcell) -> VKCell` has no attribute `__globals__`
    --> src/kfactory/layout.py:1510:61
     |
1508 |                 # Use get_type_hints to resolve string annotations
1509 |                 try:
1510 |                     type_hints = get_type_hints(f, globalns=f.__globals__)
     |                                                             ^^^^^^^^^^^^^
1511 |                     output_cell_type_ = type_hints.get("return", sig.return_annotation)
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `YAML` has no attribute `dumps`
    --> src/kfactory/layout.py:1900:31
     |
1898 |                         err_msg += (
1899 |                             "\nLayout Meta Diff:\n```\n"
1900 |                             + yaml.dumps(dict(diff.layout_meta_diff))
     |                               ^^^^^^^^^^
1901 |                             + "\n```"
1902 |                         )
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `YAML` has no attribute `dumps`
    --> src/kfactory/layout.py:1907:31
     |
1905 |                         err_msg += (
1906 |                             "\nLayout Meta Diff:\n```\n"
1907 |                             + yaml.dumps(dict(diff.cells_meta_diff))
     |                               ^^^^^^^^^^
1908 |                             + "\n```"
1909 |                         )
     |
info: rule `unresolved-attribute` is enabled by default

error[unresolved-attribute]: Object of type `(...) -> list[ManhattanRoute]` has no attribute `__name__`
    --> src/kfactory/layout.py:2174:33
     |
2172 |         list[ManhattanRoute],
2173 |     ]:
2174 |         self.routing_strategies[f.__name__] = f
     |                                 ^^^^^^^^^^
2175 |         return f
     |
info: rule `unresolved-attribute` is enabled by default

error[invalid-assignment]: Object of type `tuple[Unknown, ...]` is not assignable to `dict[str, Any]`
  --> src/kfactory/netlist.py:42:13
   |
40 |     def _validate_portref(cls, data: dict[str, Any]) -> dict[str, Any]:
41 |         if isinstance(data, str):
42 |             data = tuple(data.rsplit(",", 1))
   |             ----   ^^^^^^^^^^^^^^^^^^^^^^^^^^ Incompatible value of type `tuple[Unknown, ...]`
   |             |
   |             Declared type `dict[str, Any]`
43 |         if isinstance(data, tuple):
44 |             return {"instance": data[0], "port": data[1]}
   |
info: rule `invalid-assignment` is enabled by default

error[invalid-assignment]: Object of type `tuple[Unknown, ...]` is not assignable to `dict[str, Any]`
   --> src/kfactory/netlist.py:100:13
    |
 98 |     def _validate_array_portref(cls, data: dict[str, Any]) -> dict[str, Any]:
 99 |         if isinstance(data, str):
100 |             data = tuple(data.rsplit(",", 1))
    |             ----   ^^^^^^^^^^^^^^^^^^^^^^^^^^ Incompatible value of type `tuple[Unknown, ...]`
    |             |
    |             Declared type `dict[str, Any]`
101 |         if isinstance(data, tuple):
102 |             match = re.match(r"(.*?)<(\d+)\.(\d+)>$", data[0])
    |
info: rule `invalid-assignment` is enabled by default

warning[redundant-cast]: Value is already of type `int | float`
   --> src/kfactory/routing/electrical.py:516:64
    |
514 |                   wp_len = len(waypoints)
515 |
516 |                   width_d = cast("float | None", route_width) or cast(
    |  ________________________________________________________________^
517 | |                     "float", start_ports[0].width
518 | |                 )
    | |_________________^
519 |
520 |                   for i, wp_d in enumerate(waypoints):
    |
info: rule `redundant-cast` is enabled by default

error[invalid-argument-type]: Argument to function `route_bundle` is incorrect
   --> src/kfactory/routing/optical.py:510:17
    |
508 |                     "allow_sbend": sbend_factory is not None,
509 |                 },
510 |                 placer_function=placer,
    |                 ^^^^^^^^^^^^^^^^^^^^^^ Expected `PlacerFunction`, found `(def place_manhattan(c: ProtoTKCell[Any], p1: Port, p2: Port, pts: Sequence[Point], route_width: int | None = None, straight_factory: StraightFactoryDBU | None = None, bend90_cell: ProtoTKCell[Any] | None = None, taper_cell: ProtoTKCell[Any] | None = None, port_type: str = Literal["optical"], min_straight_taper: int = Literal[0], allow_small_routes: bool = Literal[False], allow_width_mismatch: bool | None = None, allow_layer_mismatch: bool | None = None, allow_type_mismatch: bool | None = None, purpose: str | None = Literal["routing"], **kwargs: Any) -> ManhattanRoute) | (def place_manhattan_with_sbends(c: ProtoTKCell[Any], p1: Port, p2: Port, pts: Sequence[Point], route_width: int | None = None, straight_factory: StraightFactoryDBU | None = None, bend90_cell: ProtoTKCell[Any] | None = None, taper_cell: ProtoTKCell[Any] | None = None, port_type: str = Literal["optical"], min_straight_taper: int = Literal[0], allow_small_routes: bool = Literal[False], allow_width_mismatch: bool | None = None, allow_layer_mismatch: bool | None = None, allow_type_mismatch: bool | None = None, purpose: str | None = Literal["routing"], *, sbend_factory: SBendFactoryDBU, **kwargs: Any) -> ManhattanRoute)`
511 |                 placer_kwargs=placer_kwargs,
512 |                 start_angles=cast("list[int] | int", start_angles),
    |
info: Element `def place_manhattan_with_sbends(c: ProtoTKCell[Any], p1: Port, p2: Port, pts: Sequence[Point], route_width: int | None = None, straight_factory: StraightFactoryDBU | None = None, bend90_cell: ProtoTKCell[Any] | None = None, taper_cell: ProtoTKCell[Any] | None = None, port_type: str = Literal["optical"], min_straight_taper: int = Literal[0], allow_small_routes: bool = Literal[False], allow_width_mismatch: bool | None = None, allow_layer_mismatch: bool | None = None, allow_type_mismatch: bool | None = None, purpose: str | None = Literal["routing"], *, sbend_factory: SBendFactoryDBU, **kwargs: Any) -> ManhattanRoute` of this union is not assignable to `PlacerFunction`
info: Function defined here
   --> src/kfactory/routing/generic.py:304:5
    |
304 | def route_bundle(
    |     ^^^^^^^^^^^^
305 |     *,
306 |     c: KCell,
    |
   ::: src/kfactory/routing/generic.py:316:5
    |
314 |     routing_function: ManhattanBundleRoutingFunction = route_smart,
315 |     routing_kwargs: dict[str, Any] | None = None,
316 |     placer_function: PlacerFunction,
    |     ------------------------------- Parameter declared here
317 |     placer_kwargs: dict[str, Any] | None = None,
318 |     router_post_process_function: RouterPostProcessFunction | None = None,
    |
info: rule `invalid-argument-type` is enabled by default

warning[redundant-cast]: Value is already of type `int | float`
   --> src/kfactory/routing/optical.py:694:64
    |
692 |                   wp_len = len(waypoints)
693 |
694 |                   width_d = cast("float | None", route_width) or cast(
    |  ________________________________________________________________^
695 | |                     "float", start_ports[0].width
696 | |                 )
    | |_________________^
697 |
698 |                   for i, wp_d in enumerate(waypoints):
    |
info: rule `redundant-cast` is enabled by default

error[unknown-argument]: Argument `bend180_radius` does not match any known parameter of bound method `__call__`
    --> src/kfactory/routing/optical.py:1992:13
     |
1990 |             port2=end_port,
1991 |             bend90_radius=b90r,
1992 |             bend180_radius=b180r,
     |             ^^^^^^^^^^^^^^^^^^^^
1993 |             start_straight=start_straight,
1994 |             end_straight=end_straight,
     |
info: Method signature here
  --> src/kfactory/routing/manhattan.py:55:9
   |
53 |       """Minimal signature of a manhattan function."""
54 |
55 |       def __call__(
   |  _________^
56 | |         self,
57 | |         port1: Port | kdb.Trans,
58 | |         port2: Port | kdb.Trans,
59 | |         bend90_radius: int,
60 | |         start_steps: Sequence[Step] | None = None,
61 | |         end_steps: Sequence[Step] | None = None,
62 | |     ) -> list[kdb.Point]:
   | |________________________^
63 |           """Minimal kwargs of a manhattan route function."""
64 |           ...
   |
info: rule `unknown-argument` is enabled by default

error[unknown-argument]: Argument `start_straight` does not match any known parameter of bound method `__call__`
    --> src/kfactory/routing/optical.py:1993:13
     |
1991 |             bend90_radius=b90r,
1992 |             bend180_radius=b180r,
1993 |             start_straight=start_straight,
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1994 |             end_straight=end_straight,
1995 |         )
     |
info: Method signature here
  --> src/kfactory/routing/manhattan.py:55:9
   |
53 |       """Minimal signature of a manhattan function."""
54 |
55 |       def __call__(
   |  _________^
56 | |         self,
57 | |         port1: Port | kdb.Trans,
58 | |         port2: Port | kdb.Trans,
59 | |         bend90_radius: int,
60 | |         start_steps: Sequence[Step] | None = None,
61 | |         end_steps: Sequence[Step] | None = None,
62 | |     ) -> list[kdb.Point]:
   | |________________________^
63 |           """Minimal kwargs of a manhattan route function."""
64 |           ...
   |
info: rule `unknown-argument` is enabled by default

error[unknown-argument]: Argument `end_straight` does not match any known parameter of bound method `__call__`
    --> src/kfactory/routing/optical.py:1994:13
     |
1992 |             bend180_radius=b180r,
1993 |             start_straight=start_straight,
1994 |             end_straight=end_straight,
     |             ^^^^^^^^^^^^^^^^^^^^^^^^^
1995 |         )
     |
info: Method signature here
  --> src/kfactory/routing/manhattan.py:55:9
   |
53 |       """Minimal signature of a manhattan function."""
54 |
55 |       def __call__(
   |  _________^
56 | |         self,
57 | |         port1: Port | kdb.Trans,
58 | |         port2: Port | kdb.Trans,
59 | |         bend90_radius: int,
60 | |         start_steps: Sequence[Step] | None = None,
61 | |         end_steps: Sequence[Step] | None = None,
62 | |     ) -> list[kdb.Point]:
   | |________________________^
63 |           """Minimal kwargs of a manhattan route function."""
64 |           ...
   |
info: rule `unknown-argument` is enabled by default

error[unsupported-operator]: Unsupported `<` operation
   --> src/kfactory/schematic.py:104:8
    |
102 |     """
103 |
104 |     if value < 0:
    |        -----^^^-
    |        |       |
    |        |       Has type `Literal[0]`
    |        Has type `TUnit@_gez`
105 |         raise ValueError(
106 |             "x of pitch_a and y of pitch_b must be greater or equal to zero."
    |
info: rule `unsupported-operator` is enabled by default

error[invalid-argument-type]: Argument is incorrect
   --> src/kfactory/schematic.py:446:22
    |
444 |     @cached_property
445 |     def ports(self) -> Ports[TUnit]:
446 |         return Ports(instance=self)
    |                      ^^^^^^^^^^^^^ Expected `SchematicInstance[int | float]`, found `Self@ports`
447 |
448 |     @property
    |
info: rule `invalid-argument-type` is enabled by default

error[unsupported-operator]: Unsupported `<` operation
   --> src/kfactory/schematic.py:536:20
    |
534 |     def __lt__(self, other: Port[Any] | PortRef) -> bool:
535 |         if isinstance(other, Port):
536 |             return self._as_tuple() < other._as_tuple()
    |                    ----------------^^^-----------------
    |                    |                  |
    |                    |                  Has type `tuple[str, object, object, object, object, Literal[0, 90, 180, 270] | PortRef, str]`
    |                    Has type `tuple[str, TUnit@Port | PortRef | AnchorRefX, TUnit@Port | PortRef | AnchorRefY, TUnit@Port, TUnit@Port, Literal[0, 90, 180, 270] | PortRef, str]`
537 |         return True
    |
info: Operation fails because operator `<` is not supported between the tuple elements at index 4 (of type `TUnit@Port` and `object`)
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Operator `+=` is unsupported between objects of type `TUnit@Port` and `Unknown | TUnit@Port`
   --> src/kfactory/schematic.py:596:9
    |
594 |         else:
595 |             x = self.x
596 |         x += self.dx
    |         ^^^^^^^^^^^^
597 |         if isinstance(self.y, PortRef):
598 |             if isinstance(self.y, PortArrayRef):
    |
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Operator `+=` is unsupported between objects of type `TUnit@Port` and `Unknown | TUnit@Port`
   --> src/kfactory/schematic.py:616:9
    |
614 |         else:
615 |             y = self.y
616 |         y += self.dy
    |         ^^^^^^^^^^^^
617 |         if isinstance(self.orientation, PortRef):
618 |             orientation = (
    |
info: rule `unsupported-operator` is enabled by default

error[invalid-assignment]: Invalid subscript assignment with key of type `str` and value of type `Port[int | float]` on object of type `dict[str, Port[TUnit@TSchematic] | PortRef]`
   --> src/kfactory/schematic.py:865:9
    |
863 |             orientation=orientation,
864 |         )
865 |         self.ports[p.name] = p
    |         ^^^^^^^^^^^^^^^^^^^^^-
    |                              |
    |                              Expected value of type `Port[TUnit@TSchematic] | PortRef`, got `Port[int | float]`
866 |         return p
    |
info: rule `invalid-assignment` is enabled by default

error[invalid-return-type]: Return type does not match returned value
   --> src/kfactory/schematic.py:866:16
    |
864 |         )
865 |         self.ports[p.name] = p
866 |         return p
    |                ^ expected `Port[TUnit@TSchematic]`, found `Port[int | float]`
867 |
868 |     def create_connection(
    |
   ::: src/kfactory/schematic.py:850:10
    |
848 |         dy: TUnit = 0,
849 |         orientation: Literal[0, 90, 180, 270] = 0,
850 |     ) -> Port[TUnit]:
    |          ----------- Expected `Port[TUnit@TSchematic]` because of return type
851 |         """Create a schematic-level, placeable port.
    |
info: rule `invalid-return-type` is enabled by default

error[invalid-argument-type]: Argument to function `_get_island_connections` is incorrect
    --> src/kfactory/schematic.py:1194:13
     |
1193 |         islands, instance_connections = _get_island_connections(
1194 |             self.instances, self.connections
     |             ^^^^^^^^^^^^^^ Expected `dict[str, SchematicInstance[int | float]]`, found `dict[str, SchematicInstance[TUnit@TSchematic]]`
1195 |         )
     |
info: Function defined here
    --> src/kfactory/schematic.py:2623:5
     |
2623 | def _get_island_connections(
     |     ^^^^^^^^^^^^^^^^^^^^^^^
2624 |     instances: dict[str, SchematicInstance[TUnit]],
     |     ---------------------------------------------- Parameter declared here
2625 |     connections: list[Connection[TUnit]],
2626 | ) -> tuple[dict[str, set[str]], defaultdict[str, list[Connection[TUnit]]]]:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_get_island_connections` is incorrect
    --> src/kfactory/schematic.py:1194:29
     |
1193 |         islands, instance_connections = _get_island_connections(
1194 |             self.instances, self.connections
     |                             ^^^^^^^^^^^^^^^^ Expected `list[Connection[int | float]]`, found `list[Connection[TUnit@TSchematic]]`
1195 |         )
     |
info: Function defined here
    --> src/kfactory/schematic.py:2623:5
     |
2623 | def _get_island_connections(
     |     ^^^^^^^^^^^^^^^^^^^^^^^
2624 |     instances: dict[str, SchematicInstance[TUnit]],
2625 |     connections: list[Connection[TUnit]],
     |     ------------------------------------ Parameter declared here
2626 | ) -> tuple[dict[str, set[str]], defaultdict[str, list[Connection[TUnit]]]]:
2627 |     islands: dict[str, set[str]] = {}
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_place_island` is incorrect
    --> src/kfactory/schematic.py:1227:21
     |
1225 |                     instances=instances,
1226 |                     connections=instance_connections,
1227 |                     schematic_instances=self.instances,
     |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Expected `dict[str, SchematicInstance[int | float]]`, found `dict[str, SchematicInstance[TUnit@TSchematic]]`
1228 |                     placed_insts=placed_insts,
1229 |                     placed_ports=placed_ports,
     |
info: Function defined here
    --> src/kfactory/schematic.py:2184:5
     |
2184 | def _place_island(
     |     ^^^^^^^^^^^^^
2185 |     c: KCell,
2186 |     schematic_island: set[str],
2187 |     instances: dict[str, Instance | VInstance],
2188 |     connections: dict[str, list[Connection[TUnit]]],
2189 |     schematic_instances: dict[str, SchematicInstance[TUnit]],
     |     -------------------------------------------------------- Parameter declared here
2190 |     placed_insts: set[str],
2191 |     placed_ports: set[str],
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_place_island` is incorrect
    --> src/kfactory/schematic.py:1230:21
     |
1228 |                     placed_insts=placed_insts,
1229 |                     placed_ports=placed_ports,
1230 |                     schematic=self,
     |                     ^^^^^^^^^^^^^^ Expected `TSchematic[int | float]`, found `Self@create_cell`
1231 |                     cross_sections=cross_sections,
1232 |                     factories=factories,
     |
info: Function defined here
    --> src/kfactory/schematic.py:2184:5
     |
2184 | def _place_island(
     |     ^^^^^^^^^^^^^
2185 |     c: KCell,
2186 |     schematic_island: set[str],
     |
    ::: src/kfactory/schematic.py:2192:5
     |
2190 |     placed_insts: set[str],
2191 |     placed_ports: set[str],
2192 |     schematic: TSchematic[TUnit],
     |     ---------------------------- Parameter declared here
2193 |     cross_sections: Mapping[str, CrossSection | DCrossSection],
2194 |     factories: Mapping[
     |
info: rule `invalid-argument-type` is enabled by default

error[missing-argument]: No arguments provided for required parameters `visited_instances`, `get_port_orientation_f` of function `_get_instance_orientation`
    --> src/kfactory/schematic.py:1829:20
     |
1827 |       if isinstance(placement, Placement):
1828 |           if isinstance(placement.orientation, PortRef):
1829 |               return _get_instance_orientation(
     |  ____________________^
1830 | |                 placement.orientation,
1831 | |                 schematic,
1832 | |                 instance_connections=instance_connections,
1833 | |                 instance_orientations=instance_orientations,
1834 | |             )
     | |_____________^
1835 |           return placement.orientation
1836 |       if instance_connections is None:
     |
info: Parameters declared here
    --> src/kfactory/schematic.py:1815:30
     |
1815 |   def _get_instance_orientation(
     |  ______________________________^
1816 | |     instance: str,
1817 | |     schematic: TSchematic[Any],
1818 | |     visited_instances: set[str],
1819 | |     get_port_orientation_f: Callable[..., dict[str | None, float]],
1820 | |     instance_connections: defaultdict[str, list[Connection[TUnit]]] | None = None,
1821 | |     instance_orientations: dict[str, float] | None = None,
1822 | | ) -> float | None:
     | |_^
1823 |       s_inst = schematic.instances[instance]
1824 |       placement = s_inst.placement
     |
info: rule `missing-argument` is enabled by default

error[invalid-assignment]: Object of type `defaultdict[str, list[Connection[int]]]` is not assignable to `defaultdict[str, list[Connection[TUnit@_get_instance_orientation]]] | None`
    --> src/kfactory/schematic.py:1837:12
     |
1835 |           return placement.orientation
1836 |       if instance_connections is None:
1837 |           _, instance_connections = _get_island_connections(
     |  ____________--------------------___^
     | |            |
     | |            Declared type `defaultdict[str, list[Connection[TUnit@_get_instance_orientation]]] | None`
1838 | |             schematic.instances, schematic.connections
1839 | |         )
     | |_________^ Incompatible value of type `defaultdict[str, list[Connection[int]]]`
1840 |
1841 |       visited_instances |= {instance}
     |
info: rule `invalid-assignment` is enabled by default

error[non-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
    --> src/kfactory/schematic.py:1846:23
     |
1844 |     s_inst_sign = -1 if s_inst.mirror else 1
1845 |
1846 |     for connection in instance_connections[instance]:
     |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1847 |         if isinstance(connection.root[0], Port):
1848 |             if isinstance(connection.root[0].orientation, PortRef):
     |
info: rule `non-subscriptable` is enabled by default

error[non-subscriptable]: Cannot subscript object of type `None` with no `__getitem__` method
    --> src/kfactory/schematic.py:1916:31
     |
1914 |         )
1915 |         if orientation is not None:
1916 |             for connection in instance_connections[instance]:
     |                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1917 |                 if isinstance(connection.root[0], Port):
1918 |                     continue
     |
info: rule `non-subscriptable` is enabled by default

error[invalid-argument-type]: Argument to function `_create_kinst` is incorrect
    --> src/kfactory/schematic.py:2204:34
     |
2202 |     for inst in schematic_island:
2203 |         schema_inst = schematic_instances[inst]
2204 |         kinst = _create_kinst(c, schema_inst, factories=factories)
     |                                  ^^^^^^^^^^^ Expected `SchematicInstance[int | float]`, found `SchematicInstance[TUnit@_place_island]`
2205 |         instances[inst] = kinst
2206 |         if schema_inst.placement and isinstance(schema_inst.placement, Placement):
     |
info: Function defined here
    --> src/kfactory/schematic.py:2027:5
     |
2027 | def _create_kinst(
     |     ^^^^^^^^^^^^^
2028 |     c: KCell,
2029 |     schematic_inst: SchematicInstance[TUnit],
     |     ---------------------------------------- Parameter declared here
2030 |     factories: Mapping[
2031 |         str, Callable[..., KCell] | Callable[..., DKCell] | Callable[..., VKCell]
     |
info: rule `invalid-argument-type` is enabled by default

error[unsupported-operator]: Operator `+` is unsupported between objects of type `~PortRef & ~AnchorRefX` and `object`
    --> src/kfactory/schematic.py:2248:35
     |
2246 | …                         mag=1,
2247 | …                         rot=p.orientation,
2248 | …                         x=x + p.dx,
     |                             ^^^^^^^^
2249 | …                         y=y + p.dy,
2250 | …                     )
     |
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Operator `+` is unsupported between objects of type `~PortRef & ~AnchorRefY` and `object`
    --> src/kfactory/schematic.py:2249:35
     |
2247 |                                 rot=p.orientation,
2248 |                                 x=x + p.dx,
2249 |                                 y=y + p.dy,
     |                                   ^^^^^^^^
2250 |                             )
2251 |                         )
     |
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Operator `+` is unsupported between objects of type `~PortRef & ~AnchorRefX` and `object`
    --> src/kfactory/schematic.py:2257:35
     |
2255 | …                         mag=1,
2256 | …                         rot=p.orientation,
2257 | …                         x=x + p.dx,
     |                             ^^^^^^^^
2258 | …                         y=y + p.dy,
2259 | …                     )
     |
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Operator `+` is unsupported between objects of type `~PortRef & ~AnchorRefY` and `object`
    --> src/kfactory/schematic.py:2258:35
     |
2256 | …                         rot=p.orientation,
2257 | …                         x=x + p.dx,
2258 | …                         y=y + p.dy,
     |                             ^^^^^^^^
2259 | …                     )
2260 | …                     * kdb.ICplxTrans(-kinst.ports[p.anchor.port].trans.disp)
     |
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Operator `+` is unsupported between objects of type `~PortRef & ~AnchorRefX` and `object`
    --> src/kfactory/schematic.py:2282:35
     |
2280 | …                         mag=1,
2281 | …                         rot=p.orientation,
2282 | …                         x=x + p.dx,
     |                             ^^^^^^^^
2283 | …                         y=y + p.dy,
2284 | …                     )
     |
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Operator `+` is unsupported between objects of type `~PortRef & ~AnchorRefY` and `object`
    --> src/kfactory/schematic.py:2283:35
     |
2281 | …                         rot=p.orientation,
2282 | …                         x=x + p.dx,
2283 | …                         y=y + p.dy,
     |                             ^^^^^^^^
2284 | …                     )
2285 | …                     * kdb.ICplxTrans(-kdb.Vector(_x, _y))
     |
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Operator `+` is unsupported between objects of type `~PortRef & ~AnchorRefX` and `object`
    --> src/kfactory/schematic.py:2323:35
     |
2321 | …                         mag=1,
2322 | …                         rot=p.orientation,
2323 | …                         x=x + p.dx,
     |                             ^^^^^^^^
2324 | …                         y=y + p.dy,
2325 | …                     )
     |
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Operator `+` is unsupported between objects of type `~PortRef & ~AnchorRefY` and `object`
    --> src/kfactory/schematic.py:2324:35
     |
2322 |                                 rot=p.orientation,
2323 |                                 x=x + p.dx,
2324 |                                 y=y + p.dy,
     |                                   ^^^^^^^^
2325 |                             )
2326 |                         )
     |
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Operator `+` is unsupported between objects of type `~PortRef & ~AnchorRefX` and `object`
    --> src/kfactory/schematic.py:2332:35
     |
2330 | …                         mag=1,
2331 | …                         rot=p.orientation,
2332 | …                         x=x + p.dx,
     |                             ^^^^^^^^
2333 | …                         y=y + p.dy,
2334 | …                     )
     |
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Operator `+` is unsupported between objects of type `~PortRef & ~AnchorRefY` and `object`
    --> src/kfactory/schematic.py:2333:35
     |
2331 | …                         rot=p.orientation,
2332 | …                         x=x + p.dx,
2333 | …                         y=y + p.dy,
     |                             ^^^^^^^^
2334 | …                     )
2335 | …                     * kdb.DCplxTrans(
     |
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Operator `+` is unsupported between objects of type `~PortRef & ~AnchorRefX` and `object`
    --> src/kfactory/schematic.py:2363:35
     |
2361 | …                         mag=1,
2362 | …                         rot=p.orientation,
2363 | …                         x=x + p.dx,
     |                             ^^^^^^^^
2364 | …                         y=y + p.dy,
2365 | …                     )
     |
info: rule `unsupported-operator` is enabled by default

error[unsupported-operator]: Operator `+` is unsupported between objects of type `~PortRef & ~AnchorRefY` and `object`
    --> src/kfactory/schematic.py:2364:35
     |
2362 | …                         rot=p.orientation,
2363 | …                         x=x + p.dx,
2364 | …                         y=y + p.dy,
     |                             ^^^^^^^^
2365 | …                     )
2366 | …                     * kdb.DCplxTrans(-kdb.DVector(_dx, _dy))
     |
info: rule `unsupported-operator` is enabled by default

error[invalid-argument-type]: Argument to function `_get_and_place_insts_and_ports` is incorrect
    --> src/kfactory/schematic.py:2376:9
     |
2374 |         placed_insts=placed_insts,
2375 |         placed_ports=placed_ports,
2376 |         connections=connections,
     |         ^^^^^^^^^^^^^^^^^^^^^^^ Expected `dict[str, list[Connection[int | float]]]`, found `dict[str, list[Connection[TUnit@_place_island]]]`
2377 |         schematic=schematic,
2378 |         instances=instances,
     |
info: Function defined here
    --> src/kfactory/schematic.py:2427:5
     |
2427 | def _get_and_place_insts_and_ports(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2428 |     c: KCell,
2429 |     placed_insts: set[str],
2430 |     placed_ports: set[str],
2431 |     connections: dict[str, list[Connection[TUnit]]],
     |     ----------------------------------------------- Parameter declared here
2432 |     schematic: TSchematic[TUnit],
2433 |     instances: dict[str, Instance | VInstance],
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_get_and_place_insts_and_ports` is incorrect
    --> src/kfactory/schematic.py:2377:9
     |
2375 |         placed_ports=placed_ports,
2376 |         connections=connections,
2377 |         schematic=schematic,
     |         ^^^^^^^^^^^^^^^^^^^ Expected `TSchematic[int | float]`, found `TSchematic[TUnit@_place_island]`
2378 |         instances=instances,
2379 |         placed_island_insts=placed_island_insts,
     |
info: Function defined here
    --> src/kfactory/schematic.py:2427:5
     |
2427 | def _get_and_place_insts_and_ports(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2428 |     c: KCell,
2429 |     placed_insts: set[str],
2430 |     placed_ports: set[str],
2431 |     connections: dict[str, list[Connection[TUnit]]],
2432 |     schematic: TSchematic[TUnit],
     |     ---------------------------- Parameter declared here
2433 |     instances: dict[str, Instance | VInstance],
2434 |     placed_island_insts: set[str],
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_get_and_place_insts_and_ports` is incorrect
    --> src/kfactory/schematic.py:2388:13
     |
2386 |             placed_insts=placed_insts,
2387 |             placed_ports=placed_ports,
2388 |             connections=connections,
     |             ^^^^^^^^^^^^^^^^^^^^^^^ Expected `dict[str, list[Connection[int | float]]]`, found `dict[str, list[Connection[TUnit@_place_island]]]`
2389 |             schematic=schematic,
2390 |             instances=instances,
     |
info: Function defined here
    --> src/kfactory/schematic.py:2427:5
     |
2427 | def _get_and_place_insts_and_ports(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2428 |     c: KCell,
2429 |     placed_insts: set[str],
2430 |     placed_ports: set[str],
2431 |     connections: dict[str, list[Connection[TUnit]]],
     |     ----------------------------------------------- Parameter declared here
2432 |     schematic: TSchematic[TUnit],
2433 |     instances: dict[str, Instance | VInstance],
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_get_and_place_insts_and_ports` is incorrect
    --> src/kfactory/schematic.py:2389:13
     |
2387 |             placed_ports=placed_ports,
2388 |             connections=connections,
2389 |             schematic=schematic,
     |             ^^^^^^^^^^^^^^^^^^^ Expected `TSchematic[int | float]`, found `TSchematic[TUnit@_place_island]`
2390 |             instances=instances,
2391 |             placed_island_insts=placed_island_insts,
     |
info: Function defined here
    --> src/kfactory/schematic.py:2427:5
     |
2427 | def _get_and_place_insts_and_ports(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2428 |     c: KCell,
2429 |     placed_insts: set[str],
2430 |     placed_ports: set[str],
2431 |     connections: dict[str, list[Connection[TUnit]]],
2432 |     schematic: TSchematic[TUnit],
     |     ---------------------------- Parameter declared here
2433 |     instances: dict[str, Instance | VInstance],
2434 |     placed_island_insts: set[str],
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_get_and_place_insts_and_ports` is incorrect
    --> src/kfactory/schematic.py:2411:21
     |
2409 |                     placed_insts=placed_insts,
2410 |                     placed_ports=placed_ports,
2411 |                     connections=connections,
     |                     ^^^^^^^^^^^^^^^^^^^^^^^ Expected `dict[str, list[Connection[int | float]]]`, found `dict[str, list[Connection[TUnit@_place_island]]]`
2412 |                     schematic=schematic,
2413 |                     instances=instances,
     |
info: Function defined here
    --> src/kfactory/schematic.py:2427:5
     |
2427 | def _get_and_place_insts_and_ports(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2428 |     c: KCell,
2429 |     placed_insts: set[str],
2430 |     placed_ports: set[str],
2431 |     connections: dict[str, list[Connection[TUnit]]],
     |     ----------------------------------------------- Parameter declared here
2432 |     schematic: TSchematic[TUnit],
2433 |     instances: dict[str, Instance | VInstance],
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_get_and_place_insts_and_ports` is incorrect
    --> src/kfactory/schematic.py:2412:21
     |
2410 |                     placed_ports=placed_ports,
2411 |                     connections=connections,
2412 |                     schematic=schematic,
     |                     ^^^^^^^^^^^^^^^^^^^ Expected `TSchematic[int | float]`, found `TSchematic[TUnit@_place_island]`
2413 |                     instances=instances,
2414 |                     placed_island_insts=placed_island_insts,
     |
info: Function defined here
    --> src/kfactory/schematic.py:2427:5
     |
2427 | def _get_and_place_insts_and_ports(
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2428 |     c: KCell,
2429 |     placed_insts: set[str],
2430 |     placed_ports: set[str],
2431 |     connections: dict[str, list[Connection[TUnit]]],
2432 |     schematic: TSchematic[TUnit],
     |     ---------------------------- Parameter declared here
2433 |     instances: dict[str, Instance | VInstance],
2434 |     placed_island_insts: set[str],
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_get_placeable` is incorrect
    --> src/kfactory/schematic.py:2439:9
     |
2437 |     placeable_insts, placeable_ports = _get_placeable(
2438 |         placed_insts=placed_insts,
2439 |         connections=connections,
     |         ^^^^^^^^^^^^^^^^^^^^^^^ Expected `dict[str, list[Connection[int | float]]]`, found `dict[str, list[Connection[TUnit@_get_and_place_insts_and_ports]]]`
2440 |         placed_ports=placed_ports,
2441 |         schematic=schematic,
     |
info: Function defined here
    --> src/kfactory/schematic.py:2497:5
     |
2497 | def _get_placeable(
     |     ^^^^^^^^^^^^^^
2498 |     placed_insts: set[str],
2499 |     connections: dict[str, list[Connection[TUnit]]],
     |     ----------------------------------------------- Parameter declared here
2500 |     placed_ports: set[str],
2501 |     schematic: TSchematic[TUnit],
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_get_placeable` is incorrect
    --> src/kfactory/schematic.py:2441:9
     |
2439 |         connections=connections,
2440 |         placed_ports=placed_ports,
2441 |         schematic=schematic,
     |         ^^^^^^^^^^^^^^^^^^^ Expected `TSchematic[int | float]`, found `TSchematic[TUnit@_get_and_place_insts_and_ports]`
2442 |     )
     |
info: Function defined here
    --> src/kfactory/schematic.py:2497:5
     |
2497 | def _get_placeable(
     |     ^^^^^^^^^^^^^^
2498 |     placed_insts: set[str],
2499 |     connections: dict[str, list[Connection[TUnit]]],
2500 |     placed_ports: set[str],
2501 |     schematic: TSchematic[TUnit],
     |     ---------------------------- Parameter declared here
2502 | ) -> tuple[set[str], set[str]]:
2503 |     placeable_insts: set[str] = set()
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `_connect_instances` is incorrect
    --> src/kfactory/schematic.py:2447:9
     |
2445 |         instances=instances,
2446 |         place_insts=placeable_insts,
2447 |         connections=connections,
     |         ^^^^^^^^^^^^^^^^^^^^^^^ Expected `dict[str, list[Connection[int | float]]]`, found `dict[str, list[Connection[TUnit@_get_and_place_insts_and_ports]]]`
2448 |         placed_instances=placed_insts,
2449 |     )
     |
info: Function defined here
    --> src/kfactory/schematic.py:2461:5
     |
2461 | def _connect_instances(
     |     ^^^^^^^^^^^^^^^^^^
2462 |     instances: dict[str, Instance | VInstance],
2463 |     place_insts: set[str],
2464 |     connections: dict[str, list[Connection[TUnit]]],
     |     ----------------------------------------------- Parameter declared here
2465 |     placed_instances: set[str],
2466 | ) -> None:
     |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `clean_value` is incorrect
  --> src/kfactory/serialization.py:83:37
   |
81 |         return f"{value.name or str(value.layer) + '_' + str(value.datatype)}"
82 |     if isinstance(value, list | tuple):
83 |         return "_".join(clean_value(v) for v in value)
   |                                     ^ Expected `int | float | dict[Any, Any] | ProtoKCell[Any, Any] | ((...) -> Any)`, found `object`
84 |     if isinstance(value, dict):
85 |         try:
   |
info: Function defined here
  --> src/kfactory/serialization.py:72:5
   |
72 | def clean_value(
   |     ^^^^^^^^^^^
73 |     value: float | np.float64 | dict[Any, Any] | AnyKCell | Callable[..., Any],
   |     -------------------------------------------------------------------------- Parameter declared here
74 | ) -> str:
75 |     """Makes sure a value is representable in a limited character_space."""
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument expression after ** must be a mapping with `str` key type
  --> src/kfactory/serialization.py:86:30
   |
84 |     if isinstance(value, dict):
85 |         try:
86 |             return dict2name(**value)
   |                              ^^^^^^^ Found `object`
87 |         except TypeError as e:
88 |             raise CellNameError(
   |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `dict2name` is incorrect
  --> src/kfactory/serialization.py:86:30
   |
84 |     if isinstance(value, dict):
85 |         try:
86 |             return dict2name(**value)
   |                              ^^^^^^^ Expected `str | None`, found `object`
87 |         except TypeError as e:
88 |             raise CellNameError(
   |
info: Function defined here
   --> src/kfactory/serialization.py:190:5
    |
190 | def dict2name(prefix: str | None = None, **kwargs: dict[str, Any]) -> str:
    |     ^^^^^^^^^ ------------------------- Parameter declared here
191 |     """Returns name from a dict."""
192 |     kwargs.pop("self", None)
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `dict2name` is incorrect
  --> src/kfactory/serialization.py:86:30
   |
84 |     if isinstance(value, dict):
85 |         try:
86 |             return dict2name(**value)
   |                              ^^^^^^^ Expected `dict[str, Any]`, found `object`
87 |         except TypeError as e:
88 |             raise CellNameError(
   |
info: Function defined here
   --> src/kfactory/serialization.py:190:5
    |
190 | def dict2name(prefix: str | None = None, **kwargs: dict[str, Any]) -> str:
    |     ^^^^^^^^^                            ------------------------ Parameter declared here
191 |     """Returns name from a dict."""
192 |     kwargs.pop("self", None)
    |
info: rule `invalid-argument-type` is enabled by default

error[unresolved-attribute]: Object of type `~<Protocol with members 'func'>` has no attribute `__name__`
   --> src/kfactory/serialization.py:108:29
    |
106 |                 func = func.func
107 |             v = {
108 |                 "function": func.__name__,
    |                             ^^^^^^^^^^^^^
109 |                 "module": func.__module__,
110 |                 "settings": args_as_kwargs,
    |
info: rule `unresolved-attribute` is enabled by default

error[invalid-argument-type]: Argument to function `serialize_setting` is incorrect
   --> src/kfactory/serialization.py:238:41
    |
236 |     """Serialize a setting."""
237 |     if isinstance(setting, dict):
238 |         return {name: serialize_setting(_setting) for name, _setting in setting.items()}
    |                                         ^^^^^^^^ Expected `int | float | str | ... omitted 36 union elements`, found `object`
239 |     if isinstance(setting, list):
240 |         return [serialize_setting(s) for s in setting]
    |
info: Function defined here
   --> src/kfactory/serialization.py:235:5
    |
235 | def serialize_setting(setting: MetaData) -> JSONSerializable:
    |     ^^^^^^^^^^^^^^^^^ ----------------- Parameter declared here
236 |     """Serialize a setting."""
237 |     if isinstance(setting, dict):
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `serialize_setting` is incorrect
   --> src/kfactory/serialization.py:240:35
    |
238 |         return {name: serialize_setting(_setting) for name, _setting in setting.items()}
239 |     if isinstance(setting, list):
240 |         return [serialize_setting(s) for s in setting]
    |                                   ^ Expected `int | float | str | ... omitted 36 union elements`, found `object`
241 |     if isinstance(setting, tuple):
242 |         return tuple(serialize_setting(s) for s in setting)
    |
info: Function defined here
   --> src/kfactory/serialization.py:235:5
    |
235 | def serialize_setting(setting: MetaData) -> JSONSerializable:
    |     ^^^^^^^^^^^^^^^^^ ----------------- Parameter declared here
236 |     """Serialize a setting."""
237 |     if isinstance(setting, dict):
    |
info: rule `invalid-argument-type` is enabled by default

error[invalid-argument-type]: Argument to function `serialize_setting` is incorrect
   --> src/kfactory/serialization.py:242:40
    |
240 |         return [serialize_setting(s) for s in setting]
241 |     if isinstance(setting, tuple):
242 |         return tuple(serialize_setting(s) for s in setting)
    |                                        ^ Expected `int | float | str | ... omitted 36 union elements`, found `object`
243 |     if isinstance(setting, SerializableShape):
244 |         return f"!#{setting.__class__.__name__} {setting!s}"
    |
info: Function defined here
   --> src/kfactory/serialization.py:235:5
    |
235 | def serialize_setting(setting: MetaData) -> JSONSerializable:
    |     ^^^^^^^^^^^^^^^^^ ----------------- Parameter declared here
236 |     """Serialize a setting."""
237 |     if isinstance(setting, dict):
    |
info: rule `invalid-argument-type` is enabled by default

Found 141 diagnostics

Updated: Wed Jan 7 00:12:21 UTC 2026

Comment thread src/kfactory/layout.py Outdated
joamatab and others added 2 commits December 2, 2025 10:46
Co-authored-by: Matthew Mckee <matthewmckee04@yahoo.co.uk>
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.87%. Comparing base (23a1228) to head (6ebfa59).
⚠️ Report is 47 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #838      +/-   ##
==========================================
- Coverage   65.89%   65.87%   -0.03%     
==========================================
  Files          71       71              
  Lines       13410    13410              
  Branches     2589     2589              
==========================================
- Hits         8837     8834       -3     
- Misses       3763     3766       +3     
  Partials      810      810              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants