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

Fix type hints for attributes that are optional #127

Closed
OrangeTux opened this issue Oct 13, 2020 · 0 comments · Fixed by #132
Closed

Fix type hints for attributes that are optional #127

OrangeTux opened this issue Oct 13, 2020 · 0 comments · Fixed by #132
Assignees
Labels
enhancement New feature or request

Comments

@OrangeTux
Copy link
Contributor

Currently the classes as defined in ocpp.*.call and ocpp.*.call_result have optional attributes. But the type hints don't always reflect that.

For example:

@dataclass
class GetConfigurationPayload:
    key: List = None

This should become:

@dataclass
class GetConfigurationPayload:
    key: Optional[List] = None
@OrangeTux OrangeTux added the enhancement New feature or request label Oct 13, 2020
@OrangeTux OrangeTux self-assigned this Oct 14, 2020
OrangeTux added a commit that referenced this issue Oct 15, 2020
ajmirsky pushed a commit to ajmirsky/ocpp that referenced this issue Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

1 participant