Enum completion must have a type annotation
See original GitHub issueEnum conversion will not happen correctly without type annotation.
Right:
assertion_operator: AssertionOperator = AssertionOperator.NO_ASSERTION
Wrong:
assertion_operator = AssertionOperator.NO_ASSERTION
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Type annotations for Enum attribute - python - Stack Overflow
Each value will have a type of Enum class. This means that for the code example below we will be able to put...
Read more >Better mypy typing for enum values in python #8175 - GitHub
I'd like to propose adding V = int runtime type alias to the EnumTypeWrapper (in enum_type_wrapper.py) - to avoid the need for this...
Read more >Enum Mappings with Hibernate - The Complete Guide
Most developers use enums in their domain models. You can easily map them with Hibernate. They provide a strongly typed way to model...
Read more >Validations for Enum Types - Baeldung
For this, we can create an annotation that checks if the String is valid for a specific enum.
Read more >Enum HOWTO — Python 3.11.1 documentation
A new Enum class must have one base enum class, up to one concrete data type, and as many object -based mixin classes...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No my point was that the
Get Title
assertion_operator type is in thewrong
way. But it works correctly. Trying to runGet Title NO_ASSERTION
in robot test also works correctly, so it does cast the enum correctly.I thanks I misunderstood what kind of test you were referring to in
Run keyword and expect error test required
. The examples on the thread’s first message don’t have Optional at all, and that was the only type conversion problem I was aware of.Run keyword and expect error test required