mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 02:10:59 +00:00
parent
72dd567994
commit
8e5e43de24
@ -39,7 +39,7 @@ def check_option_type(name: str, value: typing.Any, typeinfo: Type) -> None:
|
||||
|
||||
typename = str(typeinfo)
|
||||
|
||||
if typename.startswith("typing.Union"):
|
||||
if typename.startswith("typing.Union") or typename.startswith("typing.Optional"):
|
||||
for T in union_types(typeinfo):
|
||||
try:
|
||||
check_option_type(name, value, T)
|
||||
|
Loading…
Reference in New Issue
Block a user