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

CustomEnum: Release infinite recursion #11

Merged
merged 1 commit into from
Oct 21, 2024
Merged

CustomEnum: Release infinite recursion #11

merged 1 commit into from
Oct 21, 2024

Conversation

LightArrowsEXE
Copy link
Contributor

@LightArrowsEXE LightArrowsEXE commented Oct 9, 2024

Currently, an issue occurs if you pass i.e. Matrix(-1). It will continually call cls(value), which in turn calls cls.from_param, which eventually circles back to _missing_.

This at least puts a stopgap to this issue and properly raises the error, although I'm sure there's a better solution that fundamentally deals with the problem.

Minimal reproduction:

from vstools import Matrix

Matrix(-1)

Currently, an issue occurs if you pass i.e. Matrix(-1). It will continually call `cls(value)`, which in turn calls `cls.from_param`, which eventually circles back to `_missing_`.

This at least puts a stopgap to this issue and properly raises the error, although I'm sure there's a better solution that fundamentally deals with the problem.
@Setsugennoao Setsugennoao merged commit 88e1d02 into Setsugennoao:master Oct 21, 2024
1 check failed
@LightArrowsEXE LightArrowsEXE deleted the enum-recursion branch October 22, 2024 17:57
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.

2 participants