Closed asdfghjkxd closed 2 months ago
This issue can be resolved by doing an isinstance
check on the imported enum, then using the enum's constructor on the imported enum value to convert to the correct enum type.
While it may be a roundabout way of resolving this issue, the added benefit that the enums bring (clearer type annotations, restriction of permitted values, modularity and extensivity) outweighs any boilerplate code that needs to be written.
See PR #17 for more info.
Bug Report
What happened
The current code base uses enums imported from another module in the same project directory.
However, as detailed in this GitHub issue, Python enums are not equal if they enums are compared across modules, unlike other programming languages such as Java.
This causes some functions to break, especially those that rely on the equality of the enums to perform an action.
Let's move to fix this bug to restore the application to a working state.
Platform and OS
3.12.3
14.4.1
, running on a M1 ProLogs (if applicable)
N/A