mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
test_openapi: Fix __wrapped__ accesses.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
d40f3d54f1
commit
e3a8f992d5
@@ -434,10 +434,8 @@ do not match the types declared in the implementation of {function.__name__}.\n"
|
|||||||
# Iterate through the decorators to find the original
|
# Iterate through the decorators to find the original
|
||||||
# function, wrapped by has_request_variables, so we can parse
|
# function, wrapped by has_request_variables, so we can parse
|
||||||
# its arguments.
|
# its arguments.
|
||||||
while getattr(function, "__wrapped__", None):
|
while hasattr(function, "__wrapped__"):
|
||||||
function = getattr(function, "__wrapped__", None)
|
function = getattr(function, "__wrapped__")
|
||||||
# Tell mypy this is never None.
|
|
||||||
assert function is not None
|
|
||||||
|
|
||||||
# Now, we do inference mapping each REQ parameter's
|
# Now, we do inference mapping each REQ parameter's
|
||||||
# declaration details to the Python/mypy types for the
|
# declaration details to the Python/mypy types for the
|
||||||
|
|||||||
Reference in New Issue
Block a user