From d33afc2bfd86a27420a80be49ec1d0a6468ca117 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Mon, 11 May 2020 19:01:02 -0700 Subject: [PATCH] disambiguate some variable names --- masque/file/gdsii.py | 12 ++++++------ masque/pattern.py | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/masque/file/gdsii.py b/masque/file/gdsii.py index a835c05..b28333b 100644 --- a/masque/file/gdsii.py +++ b/masque/file/gdsii.py @@ -304,15 +304,15 @@ def read(stream: io.BufferedIOBase, else: args['layer'] = (element.layer, element.data_type) - shape = Polygon(**args) + poly = Polygon(**args) if clean_vertices: try: - shape.clean_vertices() + poly.clean_vertices() except PatternError: continue - pat.shapes.append(shape) + pat.shapes.append(poly) if isinstance(element, gdsii.elements.Path): if element.path_type in path_cap_map: @@ -338,15 +338,15 @@ def read(stream: io.BufferedIOBase, else: args['layer'] = (element.layer, element.data_type) - shape = Path(**args) + path = Path(**args) if clean_vertices: try: - shape.clean_vertices() + path.clean_vertices() except PatternError as err: continue - pat.shapes.append(shape) + pat.shapes.append(path) elif isinstance(element, gdsii.elements.Text): label = Label(offset=element.xy, diff --git a/masque/pattern.py b/masque/pattern.py index 2c6fd96..2f5b769 100644 --- a/masque/pattern.py +++ b/masque/pattern.py @@ -566,8 +566,8 @@ class Pattern: for entry in self.shapes + self.subpatterns: entry.offset *= c entry.scale_by(c) - for entry in self.labels: - entry.offset *= c + for label in self.labels: + label.offset *= c return self def rotate_around(self, pivot: vector2, rotation: float) -> 'Pattern':