-
Notifications
You must be signed in to change notification settings - Fork 16
PartitionInducedCycleError: pass through CycleError #390
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
pytato/partition.py
Outdated
| except CycleError as err: | ||
| raise PartitionInducedCycleError(err) | ||
| # type-ignore-reason: Needs a pytools release with | ||
| # https://github.com/inducer/pytools/pull/158 to pass mypy. |
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.
I can do that. Remind me tomorrow.
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.
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.
Thanks, I removed the ignore in 1c7969f
pytato/partition.py
Outdated
| raise PartitionInducedCycleError(err) | ||
| # type-ignore-reason: Needs a pytools release with | ||
| # https://github.com/inducer/pytools/pull/158 to pass mypy. | ||
| raise PartitionInducedCycleError(err) # type: ignore[no-untyped-call] |
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.
Maybe unpack the cycle rather than repackaging the whole error.
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.
Is a56643a what you had in mind?
ae08439 to
1363d0f
Compare
4388cda to
a56643a
Compare
|
This has conflicts now, sorry. |
246b1ac to
372b2e5
Compare
I think they have been fixed in 372b2e5. This is ready for another review. |
| except CycleError: | ||
| raise PartitionInducedCycleError | ||
| except CycleError as err: | ||
| raise PartitionInducedCycleError(err.node) |
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.
Based on inducer/pytools#159, this should probably be err.path.
|
Converted to draft for the time being, with a to-do list in the description. |
|
Superseded by #434 . |
Draft because: