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

MyPy annotated Enum error #361

Open
martynia opened this issue Jan 6, 2025 · 0 comments · May be fixed by #363
Open

MyPy annotated Enum error #361

martynia opened this issue Jan 6, 2025 · 0 comments · May be fixed by #363

Comments

@martynia
Copy link
Contributor

martynia commented Jan 6, 2025

class SandboxType(StrEnum):
Input: str = "Input"
Output: str = "Output"

When running my tests I'm seeing the following:

diracx-core/src/diracx/core/models.py:137: error: Enum members must be left unannotated  [misc]
diracx-core/src/diracx/core/models.py:137: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
diracx-core/src/diracx/core/models.py:138: error: Enum members must be left unannotated  [misc]
diracx-core/src/diracx/core/models.py:138: note: See https://typing.readthedocs.io/en/latest/spec/enums.html#defining-members
Found 2 errors in 1 file (checked 11 source files)
Error: Process completed with exit code 1.

@natthan-pigoux could you have a look into this, please.

@natthan-pigoux natthan-pigoux linked a pull request Jan 7, 2025 that will close this issue
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 a pull request may close this issue.

1 participant