diff --git a/src/py/flwr/client/grpc_adapter_client/connection.py b/src/py/flwr/client/grpc_adapter_client/connection.py index 9b84545eacd..ab823112bbe 100644 --- a/src/py/flwr/client/grpc_adapter_client/connection.py +++ b/src/py/flwr/client/grpc_adapter_client/connection.py @@ -32,7 +32,7 @@ @contextmanager -def grpc_adapter( # pylint: disable=R0913 +def grpc_adapter( # pylint: disable=R0913,too-many-positional-arguments server_address: str, insecure: bool, retry_invoker: RetryInvoker, diff --git a/src/py/flwr/client/grpc_client/connection.py b/src/py/flwr/client/grpc_client/connection.py index 29479cf5479..75d2ebe1502 100644 --- a/src/py/flwr/client/grpc_client/connection.py +++ b/src/py/flwr/client/grpc_client/connection.py @@ -60,7 +60,7 @@ def on_channel_state_change(channel_connectivity: str) -> None: @contextmanager -def grpc_connection( # pylint: disable=R0913, R0915 +def grpc_connection( # pylint: disable=R0913,R0915,too-many-positional-arguments server_address: str, insecure: bool, retry_invoker: RetryInvoker, # pylint: disable=unused-argument diff --git a/src/py/flwr/client/grpc_rere_client/connection.py b/src/py/flwr/client/grpc_rere_client/connection.py index 06701376fac..d59451cf13e 100644 --- a/src/py/flwr/client/grpc_rere_client/connection.py +++ b/src/py/flwr/client/grpc_rere_client/connection.py @@ -71,7 +71,7 @@ def on_channel_state_change(channel_connectivity: str) -> None: @contextmanager -def grpc_request_response( # pylint: disable=R0913, R0914, R0915 +def grpc_request_response( # pylint: disable=R0913,R0914,R0915,too-many-positional-arguments server_address: str, insecure: bool, retry_invoker: RetryInvoker, diff --git a/src/py/flwr/client/node_state.py b/src/py/flwr/client/node_state.py index e7967dfc8be..843c9890c5d 100644 --- a/src/py/flwr/client/node_state.py +++ b/src/py/flwr/client/node_state.py @@ -48,7 +48,7 @@ def __init__( self.node_config = node_config self.run_infos: dict[int, RunInfo] = {} - # pylint: disable=too-many-arguments + # pylint: disable=too-many-arguments,too-many-positional-arguments def register_context( self, run_id: int, diff --git a/src/py/flwr/client/rest_client/connection.py b/src/py/flwr/client/rest_client/connection.py index 485bbd7a181..465a2082b6d 100644 --- a/src/py/flwr/client/rest_client/connection.py +++ b/src/py/flwr/client/rest_client/connection.py @@ -82,7 +82,7 @@ @contextmanager -def http_request_response( # pylint: disable=,R0913, R0914, R0915 +def http_request_response( # pylint: disable=R0913,R0914,R0915,too-many-positional-arguments server_address: str, insecure: bool, # pylint: disable=unused-argument retry_invoker: RetryInvoker, diff --git a/src/py/flwr/common/logger.py b/src/py/flwr/common/logger.py index 303780fc0b5..3a058abac9c 100644 --- a/src/py/flwr/common/logger.py +++ b/src/py/flwr/common/logger.py @@ -111,7 +111,7 @@ def update_console_handler( class CustomHTTPHandler(HTTPHandler): """Custom HTTPHandler which overrides the mapLogRecords method.""" - # pylint: disable=too-many-arguments,bad-option-value,R1725 + # pylint: disable=too-many-arguments,bad-option-value,R1725,R0917 def __init__( self, identifier: str, diff --git a/src/py/flwr/common/message.py b/src/py/flwr/common/message.py index 4e792e8e02a..3bb07ff3961 100644 --- a/src/py/flwr/common/message.py +++ b/src/py/flwr/common/message.py @@ -52,7 +52,7 @@ class Metadata: # pylint: disable=too-many-instance-attributes the receiving end. """ - def __init__( # pylint: disable=too-many-arguments + def __init__( # pylint: disable=too-many-arguments,too-many-positional-arguments self, run_id: int, message_id: str, diff --git a/src/py/flwr/server/app.py b/src/py/flwr/server/app.py index d156edaa3c9..26b94b26bee 100644 --- a/src/py/flwr/server/app.py +++ b/src/py/flwr/server/app.py @@ -541,7 +541,7 @@ def _run_fleet_api_grpc_adapter( return fleet_grpc_server -# pylint: disable=import-outside-toplevel,too-many-arguments +# pylint: disable=import-outside-toplevel,too-many-arguments,too-many-positional-arguments def _run_fleet_api_rest( host: str, port: int, diff --git a/src/py/flwr/server/compat/driver_client_proxy_test.py b/src/py/flwr/server/compat/driver_client_proxy_test.py index 4a92f3df861..5bad0b56c4c 100644 --- a/src/py/flwr/server/compat/driver_client_proxy_test.py +++ b/src/py/flwr/server/compat/driver_client_proxy_test.py @@ -200,7 +200,7 @@ def test_evaluate_and_fail(self) -> None: ) self._common_assertions(ins) - def _create_message_dummy( # pylint: disable=R0913 + def _create_message_dummy( # pylint: disable=R0913,too-many-positional-arguments self, content: RecordSet, message_type: str, diff --git a/src/py/flwr/server/driver/driver.py b/src/py/flwr/server/driver/driver.py index e8429e865db..891e8d4a141 100644 --- a/src/py/flwr/server/driver/driver.py +++ b/src/py/flwr/server/driver/driver.py @@ -32,7 +32,7 @@ def run(self) -> Run: """Run information.""" @abstractmethod - def create_message( # pylint: disable=too-many-arguments + def create_message( # pylint: disable=too-many-arguments,too-many-positional-arguments self, content: RecordSet, message_type: str, diff --git a/src/py/flwr/server/driver/grpc_driver.py b/src/py/flwr/server/driver/grpc_driver.py index 421dfd30ecb..6bd57e901c8 100644 --- a/src/py/flwr/server/driver/grpc_driver.py +++ b/src/py/flwr/server/driver/grpc_driver.py @@ -158,7 +158,7 @@ def _check_message(self, message: Message) -> None: ): raise ValueError(f"Invalid message: {message}") - def create_message( # pylint: disable=too-many-arguments + def create_message( # pylint: disable=too-many-arguments,too-many-positional-arguments self, content: RecordSet, message_type: str, diff --git a/src/py/flwr/server/driver/inmemory_driver.py b/src/py/flwr/server/driver/inmemory_driver.py index 61788477f2e..4debbfbdee8 100644 --- a/src/py/flwr/server/driver/inmemory_driver.py +++ b/src/py/flwr/server/driver/inmemory_driver.py @@ -82,7 +82,7 @@ def run(self) -> Run: self._init_run() return Run(**vars(cast(Run, self._run))) - def create_message( # pylint: disable=too-many-arguments + def create_message( # pylint: disable=too-many-arguments,too-many-positional-arguments self, content: RecordSet, message_type: str, diff --git a/src/py/flwr/server/server_app.py b/src/py/flwr/server/server_app.py index e9cb4ddcaf0..9d91be88e94 100644 --- a/src/py/flwr/server/server_app.py +++ b/src/py/flwr/server/server_app.py @@ -71,7 +71,7 @@ class ServerApp: >>> print("ServerApp running") """ - # pylint: disable=too-many-arguments + # pylint: disable=too-many-arguments,too-many-positional-arguments def __init__( self, server: Optional[Server] = None, diff --git a/src/py/flwr/server/strategy/dp_adaptive_clipping.py b/src/py/flwr/server/strategy/dp_adaptive_clipping.py index 77e70bb9af0..c64091091c5 100644 --- a/src/py/flwr/server/strategy/dp_adaptive_clipping.py +++ b/src/py/flwr/server/strategy/dp_adaptive_clipping.py @@ -88,7 +88,7 @@ class DifferentialPrivacyServerSideAdaptiveClipping(Strategy): >>> ) """ - # pylint: disable=too-many-arguments,too-many-instance-attributes + # pylint: disable=too-many-arguments,too-many-instance-attributes,too-many-positional-arguments def __init__( self, strategy: Strategy, @@ -307,7 +307,7 @@ class DifferentialPrivacyClientSideAdaptiveClipping(Strategy): >>> ) """ - # pylint: disable=too-many-arguments,too-many-instance-attributes + # pylint: disable=too-many-arguments,too-many-instance-attributes,too-many-positional-arguments def __init__( self, strategy: Strategy, diff --git a/src/py/flwr/server/strategy/dpfedavg_adaptive.py b/src/py/flwr/server/strategy/dpfedavg_adaptive.py index ab513aba226..170c9d619a7 100644 --- a/src/py/flwr/server/strategy/dpfedavg_adaptive.py +++ b/src/py/flwr/server/strategy/dpfedavg_adaptive.py @@ -39,7 +39,7 @@ class DPFedAvgAdaptive(DPFedAvgFixed): This class is deprecated and will be removed in a future release. """ - # pylint: disable=too-many-arguments,too-many-instance-attributes + # pylint: disable=too-many-arguments,too-many-instance-attributes,too-many-positional-arguments def __init__( self, strategy: Strategy, diff --git a/src/py/flwr/server/strategy/dpfedavg_fixed.py b/src/py/flwr/server/strategy/dpfedavg_fixed.py index 4ea84db30cd..60f8c16f8e6 100644 --- a/src/py/flwr/server/strategy/dpfedavg_fixed.py +++ b/src/py/flwr/server/strategy/dpfedavg_fixed.py @@ -36,7 +36,7 @@ class DPFedAvgFixed(Strategy): This class is deprecated and will be removed in a future release. """ - # pylint: disable=too-many-arguments,too-many-instance-attributes + # pylint: disable=too-many-arguments,too-many-instance-attributes,too-many-positional-arguments def __init__( self, strategy: Strategy, diff --git a/src/py/flwr/server/superlink/fleet/grpc_bidi/grpc_server.py b/src/py/flwr/server/superlink/fleet/grpc_bidi/grpc_server.py index 70283c0e129..62f15fb2995 100644 --- a/src/py/flwr/server/superlink/fleet/grpc_bidi/grpc_server.py +++ b/src/py/flwr/server/superlink/fleet/grpc_bidi/grpc_server.py @@ -60,7 +60,7 @@ def valid_certificates(certificates: tuple[bytes, bytes, bytes]) -> bool: return is_valid -def start_grpc_server( # pylint: disable=too-many-arguments +def start_grpc_server( # pylint: disable=too-many-arguments,too-many-positional-arguments client_manager: ClientManager, server_address: str, max_concurrent_workers: int = 1000, @@ -156,7 +156,7 @@ def start_grpc_server( # pylint: disable=too-many-arguments return server -def generic_create_grpc_server( # pylint: disable=too-many-arguments +def generic_create_grpc_server( # pylint: disable=too-many-arguments,too-many-positional-arguments servicer_and_add_fn: Union[ tuple[FleetServicer, AddServicerToServerFn], tuple[GrpcAdapterServicer, AddServicerToServerFn], diff --git a/src/py/flwr/server/superlink/fleet/vce/vce_api.py b/src/py/flwr/server/superlink/fleet/vce/vce_api.py index 4bc245f43bd..78539053400 100644 --- a/src/py/flwr/server/superlink/fleet/vce/vce_api.py +++ b/src/py/flwr/server/superlink/fleet/vce/vce_api.py @@ -172,6 +172,7 @@ def put_taskres_into_state( pass +# pylint: disable=too-many-positional-arguments def run_api( app_fn: Callable[[], ClientApp], backend_fn: Callable[[], Backend], @@ -251,7 +252,7 @@ def run_api( # pylint: disable=too-many-arguments,unused-argument,too-many-locals,too-many-branches -# pylint: disable=too-many-statements +# pylint: disable=too-many-statements,too-many-positional-arguments def start_vce( backend_name: str, backend_config_json_stream: str, diff --git a/src/py/flwr/server/superlink/fleet/vce/vce_api_test.py b/src/py/flwr/server/superlink/fleet/vce/vce_api_test.py index ece8321dd18..bc34b825c33 100644 --- a/src/py/flwr/server/superlink/fleet/vce/vce_api_test.py +++ b/src/py/flwr/server/superlink/fleet/vce/vce_api_test.py @@ -170,7 +170,7 @@ def _autoresolve_app_dir(rel_client_app_dir: str = "backend") -> str: return str(rel_app_dir.parent / rel_client_app_dir) -# pylint: disable=too-many-arguments +# pylint: disable=too-many-arguments,too-many-positional-arguments def start_and_shutdown( backend: str = "ray", client_app_attr: Optional[str] = None, diff --git a/src/py/flwr/simulation/ray_transport/ray_client_proxy.py b/src/py/flwr/simulation/ray_transport/ray_client_proxy.py index 90e932aa801..ad9be6bd1fc 100644 --- a/src/py/flwr/simulation/ray_transport/ray_client_proxy.py +++ b/src/py/flwr/simulation/ray_transport/ray_client_proxy.py @@ -48,7 +48,7 @@ class RayActorClientProxy(ClientProxy): """Flower client proxy which delegates work using Ray.""" - def __init__( # pylint: disable=too-many-arguments + def __init__( # pylint: disable=too-many-arguments,too-many-positional-arguments self, client_fn: ClientFnExt, node_id: int, diff --git a/src/py/flwr/simulation/run_simulation.py b/src/py/flwr/simulation/run_simulation.py index 2d29629c4f0..8c4e42c3474 100644 --- a/src/py/flwr/simulation/run_simulation.py +++ b/src/py/flwr/simulation/run_simulation.py @@ -225,7 +225,7 @@ def run_simulation_from_cli() -> None: # Entry point from Python session (script or notebook) -# pylint: disable=too-many-arguments +# pylint: disable=too-many-arguments,too-many-positional-arguments def run_simulation( server_app: ServerApp, client_app: ClientApp, @@ -300,7 +300,7 @@ def run_simulation( ) -# pylint: disable=too-many-arguments +# pylint: disable=too-many-arguments,too-many-positional-arguments def run_serverapp_th( server_app_attr: Optional[str], server_app: Optional[ServerApp], @@ -369,7 +369,7 @@ def server_th_with_start_checks( return serverapp_th -# pylint: disable=too-many-locals +# pylint: disable=too-many-locals,too-many-positional-arguments def _main_loop( num_supernodes: int, backend_name: str, @@ -455,7 +455,7 @@ def _main_loop( log(DEBUG, "Stopping Simulation Engine now.") -# pylint: disable=too-many-arguments,too-many-locals +# pylint: disable=too-many-arguments,too-many-locals,too-many-positional-arguments def _run_simulation( num_supernodes: int, exit_event: EventType,