Skip to content

Commit

Permalink
Replace R0914: Too many local variables
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-narozniak committed Mar 13, 2024
1 parent a10f40d commit d33c909
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions datasets/flwr_datasets/partitioner/dirichlet_partitioner.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from flwr_datasets.partitioner.partitioner import Partitioner


# pylint: disable=R0902, R0912
# pylint: disable=R0902, R0912, R0914
class DirichletPartitioner(Partitioner):
"""Partitioner based on Dirichlet distribution.
Expand Down Expand Up @@ -196,7 +196,7 @@ def _initialize_alpha(

def _determine_partition_id_to_indices_if_needed(
self,
) -> None: # pylint: disable=R0914
) -> None:
"""Create an assignment of indices to the partition indices."""
if self._partition_id_to_indices_determined:
return
Expand Down
4 changes: 2 additions & 2 deletions datasets/flwr_datasets/partitioner/shard_partitioner.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"""Shard partitioner class."""


# pylint: disable=R0912
# pylint: disable=R0912, R0914
import math
from typing import Dict, List, Optional

Expand Down Expand Up @@ -198,7 +198,7 @@ def num_partitions(self) -> int:

def _determine_partition_id_to_indices_if_needed(
self,
) -> None: # pylint: disable=R0914
) -> None:
"""Assign sample indices to each partition id.
This method works on sorted datasets. A "shard" is a part of the dataset of
Expand Down

0 comments on commit d33c909

Please sign in to comment.