diff --git a/daemon/core/api/grpc/client.py b/daemon/core/api/grpc/client.py index 4ea3332a..a1559d64 100644 --- a/daemon/core/api/grpc/client.py +++ b/daemon/core/api/grpc/client.py @@ -160,12 +160,12 @@ def throughput_listener( stream: Any, handler: Callable[[wrappers.ThroughputsEvent], None] ) -> None: """ - Listen for throughput events and provide them to the handler. + Listen for throughput events and provide them to the handler. - :param stream: grpc stream that will provide events - :param handler: function that handles an event - :return: nothing - """ + :param stream: grpc stream that will provide events + :param handler: function that handles an event + :return: nothing + """ try: for event_proto in stream: event = wrappers.ThroughputsEvent.from_proto(event_proto) diff --git a/daemon/core/api/grpc/grpcutils.py b/daemon/core/api/grpc/grpcutils.py index 5d8d7ceb..26f2d670 100644 --- a/daemon/core/api/grpc/grpcutils.py +++ b/daemon/core/api/grpc/grpcutils.py @@ -117,7 +117,7 @@ def link_iface(iface_proto: core_pb2.Interface) -> InterfaceData: def add_link_data( - link_proto: core_pb2.Link + link_proto: core_pb2.Link, ) -> Tuple[InterfaceData, InterfaceData, LinkOptions]: """ Convert link proto to link interfaces and options data. diff --git a/daemon/core/gui/coreclient.py b/daemon/core/gui/coreclient.py index 6f098118..cd33aeca 100644 --- a/daemon/core/gui/coreclient.py +++ b/daemon/core/gui/coreclient.py @@ -753,7 +753,7 @@ class CoreClient: return self.client.get_config_service_rendered(self.session.id, node_id, name) def get_config_service_configs_proto( - self + self, ) -> List[configservices_pb2.ConfigServiceConfig]: config_service_protos = [] for node in self.session.nodes.values(): diff --git a/daemon/core/gui/graph/edges.py b/daemon/core/gui/graph/edges.py index 82fd0b97..8bb97962 100644 --- a/daemon/core/gui/graph/edges.py +++ b/daemon/core/gui/graph/edges.py @@ -56,7 +56,7 @@ def node_label_positions( src_x: int, src_y: int, dst_x: int, dst_y: int ) -> Tuple[Tuple[float, float], Tuple[float, float]]: v_x, v_y = dst_x - src_x, dst_y - src_y - v_len = math.sqrt(v_x ** 2 + v_y ** 2) + v_len = math.sqrt(v_x**2 + v_y**2) if v_len == 0: u_x, u_y = 0.0, 0.0 else: @@ -147,7 +147,7 @@ class Edge: perp_m = -1 / m b = mp_y - (perp_m * mp_x) # get arc x and y - offset = math.sqrt(self.arc ** 2 / (1 + (1 / m ** 2))) + offset = math.sqrt(self.arc**2 / (1 + (1 / m**2))) arc_x = mp_x if self.arc >= 0: arc_x += offset diff --git a/daemon/tests/test_utils.py b/daemon/tests/test_utils.py index 5a4f25a4..21d092ac 100644 --- a/daemon/tests/test_utils.py +++ b/daemon/tests/test_utils.py @@ -9,7 +9,7 @@ class TestUtils: no_args = "()" one_arg = "('one',)" two_args = "('one', 'two')" - unicode_args = u"('one', 'two', 'three')" + unicode_args = "('one', 'two', 'three')" # when no_args = utils.make_tuple_fromstr(no_args, str)