From 765fbbcd870293df1cbbdedd9b1185de6bb4899f Mon Sep 17 00:00:00 2001 From: "Hock, Martin" <martin.hock@fst.tu-darmstadt.de> Date: Thu, 2 Mar 2023 11:37:58 +0100 Subject: [PATCH] Format changes to adhere pep8 / flake8 (with black compatible 88 line length) --- functions/classes.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/functions/classes.py b/functions/classes.py index 4e98029..d5854b8 100644 --- a/functions/classes.py +++ b/functions/classes.py @@ -108,7 +108,8 @@ class LegoAssembly: if self.get_root_assembly().contains_uuid(component.uuid): raise AssertionError( - f"This assembly or a subassembly already contains the component with ID " + f"This assembly or a subassembly already contains " + f"the component with ID " f"{component.uuid}." ) component.parent = self @@ -128,8 +129,8 @@ class LegoAssembly: if self.get_root_assembly().contains_uuid(assembly.uuid): raise AssertionError( - f"This assembly or a subassembly already contains the assembly with ID " - f"{assembly.uuid}." + f"This assembly or a subassembly already contains " + f"the assembly with ID {assembly.uuid}." ) assembly.parent = self self.assemblies.append(assembly) @@ -146,8 +147,9 @@ class LegoAssembly: self.add(p) else: raise TypeError( - f"Argument should be of types {LegoAssembly.__name__}, {LegoComponent.__name__} or a list of them, " - f"got {type(part).__name__} instead." + f"Argument should be of types {LegoAssembly.__name__}, " + f"{LegoComponent.__name__} or a list of them. " + f"Got {type(part).__name__} instead." ) def children(self) -> Dict[str, List[LegoComponent] | List[LegoAssembly]]: @@ -198,9 +200,9 @@ class LegoAssembly: def clone(self, label: Optional[str] = None) -> LegoAssembly: if label is None: - label = self.properties['label'] + label = self.properties["label"] clone = LegoAssembly(self.layer, None, self.properties) - clone.properties['label'] = label + clone.properties["label"] = label for component in self.components: clone.add_component(component.clone()) for assembly in self.assemblies: -- GitLab