Skip to content

Commit 94e5ea5

Browse files
authored
Fix type hint DataTransfer.data. (#537)
In 2.0.1 both DataTransferRequest and DataTransferResponse have a field called `data` which is defined as `AnyType` so I believe these should both by of type `Any` here
1 parent 88e2006 commit 94e5ea5

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Change log
22

33
- [#516](https://github.com/mobilityhouse/ocpp/issues/516) OCPP 2.0.1 add additional security events from v1.3
4+
- [#537] (https://github.com/mobilityhouse/ocpp/pull/537) Fix DataTransfer data types
45

56
## 0.23.0 (2023-11-30)
67

ocpp/v201/call.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class CustomerInformationPayload:
9090
class DataTransferPayload:
9191
vendor_id: str
9292
message_id: Optional[str] = None
93-
data: Optional[str] = None
93+
data: Optional[Any] = None
9494
custom_data: Optional[Dict[str, Any]] = None
9595

9696

ocpp/v201/call_result.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class CustomerInformationPayload:
8787
class DataTransferPayload:
8888
status: str
8989
status_info: Optional[Dict] = None
90-
data: Optional[Dict] = None
90+
data: Optional[Any] = None
9191
custom_data: Optional[Dict[str, Any]] = None
9292

9393

0 commit comments

Comments
 (0)