diff options
author | Rebecca Chen <rechen@google.com> | 2019-05-22 14:49:08 -0700 |
---|---|---|
committer | Tres Seaver <tseaver@palladion.com> | 2019-05-22 17:49:08 -0400 |
commit | 49f2ef5169a4068dc8561ad1447c47d70873b74c (patch) | |
tree | 1f7c88c766888b883f3c46f963b590b15c47ab3c | |
parent | 37a4ac61e49d9283fd819dd5e9b4850e2182eb1f (diff) | |
download | python-api-core-49f2ef5169a4068dc8561ad1447c47d70873b74c.tar.gz |
Unbreak pytype by silencing a false positive. (#8106)
-rw-r--r-- | google/api_core/general_helpers.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/google/api_core/general_helpers.py b/google/api_core/general_helpers.py index 5661663..d2d0c44 100644 --- a/google/api_core/general_helpers.py +++ b/google/api_core/general_helpers.py @@ -26,7 +26,8 @@ _PARTIAL_VALID_ASSIGNMENTS = ("__doc__",) def wraps(wrapped): """A functools.wraps helper that handles partial objects on Python 2.""" - if isinstance(wrapped, functools.partial): + # https://github.com/google/pytype/issues/322 + if isinstance(wrapped, functools.partial): # pytype: disable=wrong-arg-types return six.wraps(wrapped, assigned=_PARTIAL_VALID_ASSIGNMENTS) else: return six.wraps(wrapped) |