Skip to content

Fix: Allow IntEnum as ex, px arguments. #3594

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

Closed
wants to merge 1 commit into from

Conversation

phi-friday
Copy link

@phi-friday phi-friday commented Apr 10, 2025

Pull Request check-list

Please make sure to review and check all of these items:

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?
  • Was the change added to CHANGES file?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

Closes: #3593

@petyaslavova petyaslavova added the maintenance Maintenance (CI, Releases, etc) label Apr 11, 2025
@petyaslavova
Copy link
Collaborator

Hi @phi-friday, thank you for your contribution — I really appreciate your effort!

In this particular case, I have some reservations about merging it. The issue lies in the type of the property in question: the expected types are limited to int or timedelta, and IntEnum values are not included in that specification.

Since the type hint is explicit, we should avoid adding additional parsing logic to handle other types that fall outside the intended scope.

@phi-friday
Copy link
Author

Hi @phi-friday, thank you for your contribution — I really appreciate your effort!

In this particular case, I have some reservations about merging it. The issue lies in the type of the property in question: the expected types are limited to int or timedelta, and IntEnum values are not included in that specification.

Since the type hint is explicit, we should avoid adding additional parsing logic to handle other types that fall outside the intended scope.

An instance of IntEnum is an instance of int, so there is no problem with type hint, but I understand the decision not to support subclasses of int.

@phi-friday phi-friday closed this Apr 12, 2025
@phi-friday phi-friday deleted the fix-int-enum branch April 12, 2025 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Maintenance (CI, Releases, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot use IntEnum as ex value
2 participants