Drop support for python3.6 (#444)

This commit is contained in:
James Hilton-Balfe
2023-02-09 08:35:41 +00:00
committed by GitHub
parent 0adcc9020c
commit 1b1bd47cb1
6 changed files with 922 additions and 355 deletions

View File

@@ -887,10 +887,10 @@ class Message(ABC):
t = cls._type_hint(field.name)
if hasattr(t, "__origin__"):
if t.__origin__ in (dict, Dict):
if t.__origin__ is dict:
# This is some kind of map (dict in Python).
return dict
elif t.__origin__ in (list, List):
elif t.__origin__ is list:
# This is some kind of list (repeated) field.
return list
elif t.__origin__ is Union and t.__args__[1] is type(None):