Skip to content

Commit

Permalink
make pylint happier
Browse files Browse the repository at this point in the history
  • Loading branch information
jaypantone committed Jan 15, 2025
1 parent c23d00e commit eeff34e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 2 additions & 4 deletions comb_spec_searcher/class_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ def __delitem__(self, key: int) -> None:
raise NotImplementedError

def __iter__(self) -> Iterator:
for label in self.label_dict.values():
yield label
yield from self.label_dict.values()

def __len__(self) -> int:
return len(self.empty_list)
Expand Down Expand Up @@ -148,8 +147,7 @@ def __iter__(self) -> Iterator[int]:
"""
Iterator of labels.
"""
for key in self.label_to_info:
yield key
yield from self.label_to_info

def __contains__(self, key: Key) -> bool:
"""
Expand Down
4 changes: 2 additions & 2 deletions comb_spec_searcher/specification.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
A combinatorial specification is a set rules of the form a -> b1, ..., bk
where each of the bi appear exactly once on the left hand side of some rule.
"""

from copy import copy
from functools import reduce
from itertools import chain
Expand Down Expand Up @@ -470,8 +471,7 @@ def generate_objects_of_size(
Return the objects with the given parameters.
Note, 'n' is reserved for the size of the object.
"""
for obj in self.root_rule.generate_objects_of_size(n, **parameters):
yield obj
yield from self.root_rule.generate_objects_of_size(n, **parameters)

def random_sample_object_of_size(
self, n: int, **parameters: int
Expand Down
4 changes: 3 additions & 1 deletion pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ disable=missing-class-docstring,
useless-suppression,
deprecated-pragma,
undefined-loop-variable,
use-symbolic-message-instead
use-symbolic-message-instead,
too-many-positional-arguments,


# Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option
Expand Down

0 comments on commit eeff34e

Please sign in to comment.