Skip to content

Commit

Permalink
change isinstance(..., frozenset) to abc_Set, pt2
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener authored and inducer committed Feb 16, 2024
1 parent 0b49c91 commit 0b0ed85
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions loopy/translation_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"""

import collections
from collections.abc import Set as abc_Set
from dataclasses import field, dataclass, replace
from typing import FrozenSet, Optional, TYPE_CHECKING, Mapping, Callable, Union, Any
from warnings import warn
Expand Down Expand Up @@ -195,7 +196,8 @@ class TranslationUnit:
entrypoints: FrozenSet[str]

def __post_init__(self):
assert isinstance(self.entrypoints, frozenset)

assert isinstance(self.entrypoints, abc_Set)
assert isinstance(self.callables_table, Map)

object.__setattr__(self, "_program_executor_cache", {})
Expand Down Expand Up @@ -239,7 +241,7 @@ def with_entrypoints(self, entrypoints):
entrypoints = frozenset([e.strip() for e in
entrypoints.split(",")])

assert isinstance(entrypoints, frozenset)
assert isinstance(entrypoints, abc_Set)

return self.copy(entrypoints=entrypoints)

Expand Down

0 comments on commit 0b0ed85

Please sign in to comment.