daemon: formatting changes related to updating the python black formatter
This commit is contained in:
		
							parent
							
								
									4c351b0d72
								
							
						
					
					
						commit
						93272d6ed7
					
				
					 5 changed files with 10 additions and 10 deletions
				
			
		|  | @ -160,12 +160,12 @@ def throughput_listener( | ||||||
|     stream: Any, handler: Callable[[wrappers.ThroughputsEvent], None] |     stream: Any, handler: Callable[[wrappers.ThroughputsEvent], None] | ||||||
| ) -> 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 stream: grpc stream that will provide events | ||||||
|         :param handler: function that handles an event |     :param handler: function that handles an event | ||||||
|         :return: nothing |     :return: nothing | ||||||
|         """ |     """ | ||||||
|     try: |     try: | ||||||
|         for event_proto in stream: |         for event_proto in stream: | ||||||
|             event = wrappers.ThroughputsEvent.from_proto(event_proto) |             event = wrappers.ThroughputsEvent.from_proto(event_proto) | ||||||
|  |  | ||||||
|  | @ -117,7 +117,7 @@ def link_iface(iface_proto: core_pb2.Interface) -> InterfaceData: | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def add_link_data( | def add_link_data( | ||||||
|     link_proto: core_pb2.Link |     link_proto: core_pb2.Link, | ||||||
| ) -> Tuple[InterfaceData, InterfaceData, LinkOptions]: | ) -> Tuple[InterfaceData, InterfaceData, LinkOptions]: | ||||||
|     """ |     """ | ||||||
|     Convert link proto to link interfaces and options data. |     Convert link proto to link interfaces and options data. | ||||||
|  |  | ||||||
|  | @ -753,7 +753,7 @@ class CoreClient: | ||||||
|         return self.client.get_config_service_rendered(self.session.id, node_id, name) |         return self.client.get_config_service_rendered(self.session.id, node_id, name) | ||||||
| 
 | 
 | ||||||
|     def get_config_service_configs_proto( |     def get_config_service_configs_proto( | ||||||
|         self |         self, | ||||||
|     ) -> List[configservices_pb2.ConfigServiceConfig]: |     ) -> List[configservices_pb2.ConfigServiceConfig]: | ||||||
|         config_service_protos = [] |         config_service_protos = [] | ||||||
|         for node in self.session.nodes.values(): |         for node in self.session.nodes.values(): | ||||||
|  |  | ||||||
|  | @ -56,7 +56,7 @@ def node_label_positions( | ||||||
|     src_x: int, src_y: int, dst_x: int, dst_y: int |     src_x: int, src_y: int, dst_x: int, dst_y: int | ||||||
| ) -> Tuple[Tuple[float, float], Tuple[float, float]]: | ) -> Tuple[Tuple[float, float], Tuple[float, float]]: | ||||||
|     v_x, v_y = dst_x - src_x, dst_y - src_y |     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: |     if v_len == 0: | ||||||
|         u_x, u_y = 0.0, 0.0 |         u_x, u_y = 0.0, 0.0 | ||||||
|     else: |     else: | ||||||
|  | @ -147,7 +147,7 @@ class Edge: | ||||||
|         perp_m = -1 / m |         perp_m = -1 / m | ||||||
|         b = mp_y - (perp_m * mp_x) |         b = mp_y - (perp_m * mp_x) | ||||||
|         # get arc x and y |         # 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 |         arc_x = mp_x | ||||||
|         if self.arc >= 0: |         if self.arc >= 0: | ||||||
|             arc_x += offset |             arc_x += offset | ||||||
|  |  | ||||||
|  | @ -9,7 +9,7 @@ class TestUtils: | ||||||
|         no_args = "()" |         no_args = "()" | ||||||
|         one_arg = "('one',)" |         one_arg = "('one',)" | ||||||
|         two_args = "('one', 'two')" |         two_args = "('one', 'two')" | ||||||
|         unicode_args = u"('one', 'two', 'three')" |         unicode_args = "('one', 'two', 'three')" | ||||||
| 
 | 
 | ||||||
|         # when |         # when | ||||||
|         no_args = utils.make_tuple_fromstr(no_args, str) |         no_args = utils.make_tuple_fromstr(no_args, str) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue