diff --git a/pyglove/core/geno/base.py b/pyglove/core/geno/base.py index 1a516fb..8e8e525 100644 --- a/pyglove/core/geno/base.py +++ b/pyglove/core/geno/base.py @@ -1348,7 +1348,7 @@ def from_fn( f'Choices: {dna_spec.num_choices}, ' f'Location: {dna_spec.location.path}.') children = [] - for i, choice in enumerate(decision): # pyrefly: ignore[bad-argument-type] + for i, choice in enumerate(decision): # pyrefly: ignore[bad-argument-type, not-iterable] choice_location = utils.KeyPath(i, dna_spec.location) if not isinstance(choice, int): raise ValueError( diff --git a/pyglove/core/hyper/categorical.py b/pyglove/core/hyper/categorical.py index b26e3cb..8084f48 100644 --- a/pyglove/core/hyper/categorical.py +++ b/pyglove/core/hyper/categorical.py @@ -192,7 +192,7 @@ def _decode(self) -> List[Any]: ) ) choices = [] - for i, sub_dna in enumerate(dna): # pyrefly: ignore[bad-argument-type] + for i, sub_dna in enumerate(dna): # pyrefly: ignore[bad-argument-type, not-iterable] if not isinstance(sub_dna.value, int): raise ValueError( utils.message_on_path( diff --git a/pyglove/core/symbolic/class_wrapper.py b/pyglove/core/symbolic/class_wrapper.py index 07e3c27..4a76e4c 100644 --- a/pyglove/core/symbolic/class_wrapper.py +++ b/pyglove/core/symbolic/class_wrapper.py @@ -466,7 +466,7 @@ def wrap_module( origin_cls_to_wrap_cls = {} for symbol_name in (names or dir(module)): s = getattr(module, symbol_name) - if inspect.isclass(s) and (not where or where(s)): + if inspect.isclass(s) and (not where or where(s)): # pyrefly: ignore[bad-argument-type] # NOTE(daiyip): It's possible that a name under a module is an alias for # another class. In such case, we do not create duplicated wrappers but # shares the same wrapper classes with different names.