@@ -118,7 +118,8 @@ def __init__(
118118
119119 self ._metadata = (("key" , auth_key ),) if auth_key else ()
120120
121- async def stream_gridpool_orders ( # pylint: disable=too-many-arguments
121+ async def stream_gridpool_orders (
122+ # pylint: disable=too-many-arguments, too-many-positional-arguments
122123 self ,
123124 gridpool_id : int ,
124125 order_states : list [OrderState ] | None = None ,
@@ -173,10 +174,11 @@ async def stream_gridpool_orders( # pylint: disable=too-many-arguments
173174 _logger .exception (
174175 "Error occurred while streaming gridpool orders: %s" , e
175176 )
176- raise e
177+ raise
177178 return self ._gridpool_orders_streams [stream_key ].new_receiver ()
178179
179- async def stream_gridpool_trades ( # pylint: disable=too-many-arguments
180+ async def stream_gridpool_trades (
181+ # pylint: disable=too-many-arguments, too-many-positional-arguments
180182 self ,
181183 gridpool_id : int ,
182184 trade_states : list [TradeState ] | None = None ,
@@ -231,7 +233,7 @@ async def stream_gridpool_trades( # pylint: disable=too-many-arguments
231233 _logger .exception (
232234 "Error occurred while streaming gridpool trades: %s" , e
233235 )
234- raise e
236+ raise
235237 return self ._gridpool_trades_streams [stream_key ].new_receiver ()
236238
237239 async def stream_public_trades (
@@ -281,10 +283,11 @@ async def stream_public_trades(
281283 )
282284 except grpc .RpcError as e :
283285 _logger .exception ("Error occurred while streaming public trades: %s" , e )
284- raise e
286+ raise
285287 return self ._public_trades_streams [public_trade_filter ].new_receiver ()
286288
287- def validate_params ( # pylint: disable=too-many-arguments
289+ def validate_params (
290+ # pylint: disable=too-many-arguments, too-many-positional-arguments
288291 self ,
289292 price : Price | None | _Sentinel = NO_VALUE ,
290293 quantity : Energy | None | _Sentinel = NO_VALUE ,
@@ -316,6 +319,7 @@ def validate_params( # pylint: disable=too-many-arguments
316319
317320 Raises:
318321 ValueError: If the parameters are invalid.
322+ NotImplementedError: If the order type is not supported.
319323 """
320324 if not isinstance (price , _Sentinel ) and price is not None :
321325 validate_decimal_places (price .amount , PRECISION_DECIMAL_PRICE , "price" )
@@ -359,7 +363,8 @@ def validate_params( # pylint: disable=too-many-arguments
359363 "Currently only limit orders are supported"
360364 )
361365
362- async def create_gridpool_order ( # pylint: disable=too-many-arguments, too-many-locals
366+ async def create_gridpool_order (
367+ # pylint: disable=too-many-arguments, too-many-positional-arguments, too-many-locals
363368 self ,
364369 gridpool_id : int ,
365370 delivery_area : DeliveryArea ,
@@ -441,11 +446,12 @@ async def create_gridpool_order( # pylint: disable=too-many-arguments, too-many
441446 )
442447 except grpc .RpcError as e :
443448 _logger .exception ("Error occurred while creating gridpool order: %s" , e )
444- raise e
449+ raise
445450
446451 return OrderDetail .from_pb (response .order_detail )
447452
448- async def update_gridpool_order ( # pylint: disable=too-many-arguments, too-many-locals
453+ async def update_gridpool_order (
454+ # pylint: disable=too-many-arguments, too-many-positional-arguments, too-many-locals
449455 self ,
450456 gridpool_id : int ,
451457 order_id : int ,
@@ -486,6 +492,7 @@ async def update_gridpool_order( # pylint: disable=too-many-arguments, too-many
486492
487493 Raises:
488494 ValueError: If no fields to update are provided.
495+ grpc.RpcError: An error occurred while updating the order.
489496 """
490497 self .validate_params (
491498 price = price ,
@@ -555,7 +562,7 @@ async def update_gridpool_order( # pylint: disable=too-many-arguments, too-many
555562
556563 except grpc .RpcError as e :
557564 _logger .exception ("Error occurred while updating gridpool order: %s" , e )
558- raise e
565+ raise
559566
560567 async def cancel_gridpool_order (
561568 self , gridpool_id : int , order_id : int
@@ -586,7 +593,7 @@ async def cancel_gridpool_order(
586593 return OrderDetail .from_pb (response .order_detail )
587594 except grpc .RpcError as e :
588595 _logger .exception ("Error occurred while cancelling gridpool order: %s" , e )
589- raise e
596+ raise
590597
591598 async def cancel_all_gridpool_orders (self , gridpool_id : int ) -> int :
592599 """
@@ -617,7 +624,7 @@ async def cancel_all_gridpool_orders(self, gridpool_id: int) -> int:
617624 _logger .exception (
618625 "Error occurred while cancelling all gridpool orders: %s" , e
619626 )
620- raise e
627+ raise
621628
622629 async def get_gridpool_order (self , gridpool_id : int , order_id : int ) -> OrderDetail :
623630 """
@@ -647,9 +654,10 @@ async def get_gridpool_order(self, gridpool_id: int, order_id: int) -> OrderDeta
647654 return OrderDetail .from_pb (response .order_detail )
648655 except grpc .RpcError as e :
649656 _logger .exception ("Error occurred while getting gridpool order: %s" , e )
650- raise e
657+ raise
651658
652- async def list_gridpool_orders ( # pylint: disable=too-many-arguments
659+ async def list_gridpool_orders (
660+ # pylint: disable=too-many-arguments, too-many-positional-arguments
653661 self ,
654662 gridpool_id : int ,
655663 order_states : list [OrderState ] | None = None ,
@@ -718,9 +726,10 @@ async def list_gridpool_orders( # pylint: disable=too-many-arguments
718726 return orders
719727 except grpc .RpcError as e :
720728 _logger .exception ("Error occurred while listing gridpool orders: %s" , e )
721- raise e
729+ raise
722730
723- async def list_gridpool_trades ( # pylint: disable=too-many-arguments
731+ async def list_gridpool_trades (
732+ # pylint: disable=too-many-arguments, too-many-positional-arguments
724733 self ,
725734 gridpool_id : int ,
726735 trade_states : list [TradeState ] | None = None ,
@@ -779,9 +788,10 @@ async def list_gridpool_trades( # pylint: disable=too-many-arguments
779788 return [Trade .from_pb (trade ) for trade in response .trades ]
780789 except grpc .RpcError as e :
781790 _logger .exception ("Error occurred while listing gridpool trades: %s" , e )
782- raise e
791+ raise
783792
784- async def list_public_trades ( # pylint: disable=too-many-arguments
793+ async def list_public_trades (
794+ # pylint: disable=too-many-arguments, too-many-positional-arguments
785795 self ,
786796 states : list [TradeState ] | None = None ,
787797 delivery_period : DeliveryPeriod | None = None ,
@@ -837,4 +847,4 @@ async def list_public_trades( # pylint: disable=too-many-arguments
837847 ]
838848 except grpc .RpcError as e :
839849 _logger .exception ("Error occurred while listing public trades: %s" , e )
840- raise e
850+ raise
0 commit comments