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

model.KeyTypes: Ignore mypy errors for abstract classes to be compliant to spec #105

Merged

Conversation

s-heppner
Copy link
Contributor

@s-heppner s-heppner commented Aug 11, 2023

Mypy appears to not like abstract classes in a context where only concrete classes should be given:

Only concrete class can be given where
"tuple[type[Referable], KeyTypes]" is expected

However, the spec demands the three abstract classes

  • EventElement
  • DataElement
  • SubmodelElement

to appear inside the model.KeyTypes Enum.
Therefore, we ignore these errors via # type: ignore.

This fixes the mypy error in #104

Mypy appears to not like abstract classes in a context where only
concrete classes should be given:

```
Only concrete class can be given where
"tuple[type[Referable], KeyTypes]" is expected
```

However, the spec demands the three abstract classes
- `EventElement`
- `DataElement`
- `SubmodelElement`

to appear inside the `model.KeyTypes` Enum.
Therefore, we ignore these errors via `# type: ignore`.
@zrgt
Copy link
Contributor

zrgt commented Aug 11, 2023

Looks good to me

@s-heppner s-heppner merged commit 493d5d3 into eclipse-basyx:improve/V30 Aug 11, 2023
5 checks passed
@s-heppner s-heppner deleted the Fix/mypy_type_concrete branch August 11, 2023 12:15
@s-heppner s-heppner added the v3.0 label Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants