modernize type annotations
This commit is contained in:
parent
ada8c591a0
commit
1463535676
34 changed files with 409 additions and 444 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from typing import Tuple, Sequence
|
||||
from typing import Sequence
|
||||
|
||||
import numpy
|
||||
from numpy import pi
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# TODO update tutorials
|
||||
from typing import Tuple, Sequence, Dict, Mapping
|
||||
from typing import Sequence, Mapping
|
||||
|
||||
import numpy
|
||||
from numpy import pi
|
||||
|
|
@ -43,7 +43,7 @@ def perturbed_l3(
|
|||
trench_layer: layer_t = (1, 0),
|
||||
shifts_a: Sequence[float] = (0.15, 0, 0.075),
|
||||
shifts_r: Sequence[float] = (1.0, 1.0, 1.0),
|
||||
xy_size: Tuple[int, int] = (10, 10),
|
||||
xy_size: tuple[int, int] = (10, 10),
|
||||
perturbed_radius: float = 1.1,
|
||||
trench_width: float = 1200,
|
||||
) -> Pattern:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
from typing import Tuple, Sequence, Callable
|
||||
from typing import Sequence, Callable
|
||||
from pprint import pformat
|
||||
|
||||
import numpy
|
||||
|
|
@ -116,12 +116,12 @@ if __name__ == '__main__':
|
|||
# other: Pattern,
|
||||
# label_layer: layer_t = 'WATLAYER',
|
||||
# *,
|
||||
# port_map: Optional[Dict[str, Optional[str]]] = None,
|
||||
# port_map: Dict[str, str | None] | None = None,
|
||||
# **kwargs,
|
||||
# ) -> 'prout':
|
||||
#
|
||||
# Pattern.place(self, other, port_map=port_map, **kwargs)
|
||||
# name: Optional[str]
|
||||
# name: str | None
|
||||
# for name in other.ports:
|
||||
# if port_map:
|
||||
# assert(name is not None)
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
Routines for creating normalized 2D lattices and common photonic crystal
|
||||
cavity designs.
|
||||
"""
|
||||
from typing import Sequence, Tuple
|
||||
from typing import Sequence
|
||||
|
||||
import numpy
|
||||
from numpy.typing import ArrayLike, NDArray
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue