File tree Expand file tree Collapse file tree 1 file changed +6
-10
lines changed
Expand file tree Collapse file tree 1 file changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -391,15 +391,13 @@ def write_str_opt_list(data: WriteBuffer, value: list[str | None]) -> None:
391391 write_str_opt (data , item )
392392
393393
394- JsonValue : _TypeAlias = None | int | str | bool | list ["JsonValue" ] | dict [str , "JsonValue" ]
394+ Value : _TypeAlias = None | int | str | bool
395+ JsonValue : _TypeAlias = Value | list ["JsonValue" ] | dict [str , "JsonValue" ]
396+
397+ # Currently tuples are used by mypyc plugin. They will be normalized to
398+ # JSON lists after a roundtrip.
395399JsonValueEx : _TypeAlias = (
396- None
397- | int
398- | str
399- | bool
400- | list ["JsonValueEx" ]
401- | dict [str , "JsonValueEx" ]
402- | tuple ["JsonValueEx" , ...]
400+ Value | list ["JsonValueEx" ] | dict [str , "JsonValueEx" ] | tuple ["JsonValueEx" , ...]
403401)
404402
405403
@@ -424,8 +422,6 @@ def read_json_value(data: ReadBuffer) -> JsonValue:
424422 assert False , f"Invalid JSON tag: { tag } "
425423
426424
427- # Currently tuples are used by mypyc plugin. They will be normalized to
428- # JSON lists after a roundtrip.
429425def write_json_value (data : WriteBuffer , value : JsonValueEx ) -> None :
430426 if value is None :
431427 write_tag (data , LITERAL_NONE )
You can’t perform that action at this time.
0 commit comments