Drop support for python3.6 (#444)
This commit is contained in:
committed by
GitHub
parent
0adcc9020c
commit
1b1bd47cb1
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user