From 80f4b630089fa6b869d83872ccc80b2a585e8ee6 Mon Sep 17 00:00:00 2001 From: jan Date: Wed, 30 Mar 2022 23:58:53 -0700 Subject: [PATCH] get() is never actually needed, remove it --- snarl/main.py | 2 +- snarl/tracker.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/snarl/main.py b/snarl/main.py index ad5dda3..dbb3155 100644 --- a/snarl/main.py +++ b/snarl/main.py @@ -53,7 +53,7 @@ def trace_connectivity( else: name = NetName() # Anonymous net - nets_info.get(name, layer).append(poly) + nets_info.nets[name][layer].append(poly) if len(found_nets) > 1: # Found a short diff --git a/snarl/tracker.py b/snarl/tracker.py index ec269ac..8e24c69 100644 --- a/snarl/tracker.py +++ b/snarl/tracker.py @@ -64,8 +64,6 @@ class NetsInfo: self.nets[keep_net][layer] += self.nets[old_net][layer] del self.nets[old_net] - def get(self, net: NetName, layer: layer_t) -> List[contour_t]: - return self.nets[self.resolve_name(net)][layer] def get_shorted_nets(self) -> List[Set[NetName]]: shorts = defaultdict(list)