Skip to content

Commit

Permalink
Merge pull request #107 from facebookincubator/disable_async_validati…
Browse files Browse the repository at this point in the history
…on_for_builtins

Disable async validation for builtins
  • Loading branch information
fornellas authored Dec 17, 2019
2 parents 3988fc1 + c40ae9a commit 1c4812c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions testslide/mock_callable.py
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,12 @@ def _validate_patch(
)
if (
coroutine_function
and not inspect.iscoroutinefunction(template_value)
and (
# FIXME We can not reliably introspect coroutine functions
# for builtins: https://bugs.python.org/issue38225
type(template_value) is not type(list.append)
and not inspect.iscoroutinefunction(template_value)
)
and not callable_returns_coroutine
):
raise ValueError(
Expand Down Expand Up @@ -640,7 +645,12 @@ def _validate_patch(
)
if (
coroutine_function
and not inspect.iscoroutinefunction(original_callable)
and (
# FIXME We can not reliably introspect coroutine functions
# for builtins: https://bugs.python.org/issue38225
type(original_callable) is not type(list.append)
and not inspect.iscoroutinefunction(original_callable)
)
and not callable_returns_coroutine
):
raise ValueError(
Expand Down

0 comments on commit 1c4812c

Please sign in to comment.