You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Python 3.12.3
MacOS Sonoma 14.4.1, running on a M1 Pro
Logs (if applicable)
N/A
The text was updated successfully, but these errors were encountered:
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.
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
The text was updated successfully, but these errors were encountered: