From eeb1dc7f2be7eac6aceff2168072bbd340bff214 Mon Sep 17 00:00:00 2001 From: gabriel-tessier Date: Fri, 4 Nov 2022 19:57:08 +0900 Subject: [PATCH] refactor: Reflect changes in Cluster class (#653) --- diagrams/__init__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/diagrams/__init__.py b/diagrams/__init__.py index 690a8a0..b46fa46 100644 --- a/diagrams/__init__.py +++ b/diagrams/__init__.py @@ -260,11 +260,8 @@ class Cluster: self._diagram.subgraph(self.dot) setcluster(self._parent) - def _validate_direction(self, direction: str): - direction = direction.upper() - if direction in self.__directions: - return True - return False + def _validate_direction(self, direction: str) -> bool: + return direction.upper() in self.__directions def node(self, nodeid: str, label: str, **attrs) -> None: """Create a new node in the cluster."""