-
Notifications
You must be signed in to change notification settings - Fork 3
Use instance check instead of equality in as_dataclass_node #601
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
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
Pull Request Test Coverage Report for Build 13540109426Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
type(cls) is only equal to type if no other meta class has been used. This includes classes derived from ABC, so it is a bit inconvenient. Using the instance check however seems to work in these cases.
c6f96cd
to
75e4dc6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good catch. Now downsides are obvious to me, and the upside is clear. Once the CI passes, I'm happy.
Seems codacy is slow today. Based on its last known output I was gonna ignore it anyway as we discussed on zoom, so I'll go ahead an merge. |
type(cls) is only equal to type if no other meta class has been used. This includes classes derived from ABC, so it is a bit inconvenient. Using the instance check however seems to work in these cases.