Loosen requirements from List to Sequence
This commit is contained in:
parent
64fbd08cac
commit
5f72fe318f
@ -50,7 +50,7 @@ path_cap_map = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def build(patterns: Union[Pattern, List[Pattern]],
|
def build(patterns: Union[Pattern, Sequence[Pattern]],
|
||||||
meters_per_unit: float,
|
meters_per_unit: float,
|
||||||
logical_units_per_unit: float = 1,
|
logical_units_per_unit: float = 1,
|
||||||
library_name: str = 'masque-gdsii-write',
|
library_name: str = 'masque-gdsii-write',
|
||||||
@ -136,7 +136,7 @@ def build(patterns: Union[Pattern, List[Pattern]],
|
|||||||
return lib
|
return lib
|
||||||
|
|
||||||
|
|
||||||
def write(patterns: Union[Pattern, List[Pattern]],
|
def write(patterns: Union[Pattern, Sequence[Pattern]],
|
||||||
stream: io.BufferedIOBase,
|
stream: io.BufferedIOBase,
|
||||||
*args,
|
*args,
|
||||||
**kwargs):
|
**kwargs):
|
||||||
@ -154,7 +154,7 @@ def write(patterns: Union[Pattern, List[Pattern]],
|
|||||||
lib.save(stream)
|
lib.save(stream)
|
||||||
return
|
return
|
||||||
|
|
||||||
def writefile(patterns: Union[List[Pattern], Pattern],
|
def writefile(patterns: Union[Sequence[Pattern], Pattern],
|
||||||
filename: Union[str, pathlib.Path],
|
filename: Union[str, pathlib.Path],
|
||||||
*args,
|
*args,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
|
@ -50,7 +50,7 @@ path_cap_map = {
|
|||||||
#TODO implement properties
|
#TODO implement properties
|
||||||
#TODO implement more shape types?
|
#TODO implement more shape types?
|
||||||
|
|
||||||
def build(patterns: Union[Pattern, List[Pattern]],
|
def build(patterns: Union[Pattern, Sequence[Pattern]],
|
||||||
units_per_micron: int,
|
units_per_micron: int,
|
||||||
layer_map: Optional[Dict[str, Union[int, Tuple[int, int]]]] = None,
|
layer_map: Optional[Dict[str, Union[int, Tuple[int, int]]]] = None,
|
||||||
*,
|
*,
|
||||||
@ -156,7 +156,7 @@ def build(patterns: Union[Pattern, List[Pattern]],
|
|||||||
return lib
|
return lib
|
||||||
|
|
||||||
|
|
||||||
def write(patterns: Union[List[Pattern], Pattern],
|
def write(patterns: Union[Sequence[Pattern], Pattern],
|
||||||
stream: io.BufferedIOBase,
|
stream: io.BufferedIOBase,
|
||||||
*args,
|
*args,
|
||||||
**kwargs):
|
**kwargs):
|
||||||
@ -174,7 +174,7 @@ def write(patterns: Union[List[Pattern], Pattern],
|
|||||||
lib.write(stream)
|
lib.write(stream)
|
||||||
|
|
||||||
|
|
||||||
def writefile(patterns: Union[List[Pattern], Pattern],
|
def writefile(patterns: Union[Sequence[Pattern], Pattern],
|
||||||
filename: Union[str, pathlib.Path],
|
filename: Union[str, pathlib.Path],
|
||||||
*args,
|
*args,
|
||||||
**kwargs,
|
**kwargs,
|
||||||
|
Loading…
Reference in New Issue
Block a user