Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change isinstance(..., frozenset) to abc_Set, pt2 #825

Merged
merged 1 commit into from
Feb 16, 2024
Merged

Conversation

matthiasdiener
Copy link
Collaborator

No description provided.

@@ -195,7 +196,8 @@ class TranslationUnit:
entrypoints: FrozenSet[str]

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

assert isinstance(self.entrypoints, abc_Set)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain why this is needed? Thanks!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, these changes are necessary for compatibility with alternative set implementations, in particular https://github.com/matthiasdiener/orderedsets.

@inducer inducer merged commit 0b0ed85 into main Feb 16, 2024
16 checks passed
@inducer inducer deleted the isinst-frozenset2 branch February 16, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants