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

Add support for enum #282

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add support for enum #282

wants to merge 3 commits into from

Conversation

ehooo
Copy link

@ehooo ehooo commented Oct 27, 2022

Fixes #281 .

Changes proposed in this pull request:

  • Add support for enum types

Attention: @prkumar

@ehooo ehooo changed the title Fixes # 281 Add support for enum Oct 27, 2022
@codecov
Copy link

codecov bot commented Oct 27, 2022

Codecov Report

Merging #282 (8f67f98) into master (65125ec) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master      #282   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           44        42    -2     
  Lines         2471      2448   -23     
  Branches       358       355    -3     
=========================================
- Hits          2471      2448   -23     
Impacted Files Coverage Δ
uplink/converters/keys.py 100.00% <100.00%> (ø)
uplink/__init__.py
uplink/exceptions.py

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Owner

@prkumar prkumar left a comment

Choose a reason for hiding this comment

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

@ehooo - Thanks for taking the time to make this change!

Adding this to Sequence will add support to only a few annotations, like @Query and @QueryMap. Sequence is responsible for applying a converter to each item in a list of values.

To add broad support for enums, we should add this to either the TypingConverter or the StandardConverter.

@ehooo
Copy link
Author

ehooo commented Nov 19, 2022

Hello @prkumar

Thanks for your response, i just check it and i don't know where do you want to add this conversion.

I see that the property converter_key on Query and QueryMap returns a Sequence class so i think this is the better location to make the convertion.

Please let me know where do you think i could move it.

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.

Error parsing enum value on query
2 participants