Skip to content

Commit

Permalink
Unbreak pytype by silencing a false positive. (#8106)
Browse files Browse the repository at this point in the history
  • Loading branch information
rchen152 authored and tseaver committed May 22, 2019
1 parent 67d8504 commit d9127d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion api_core/google/api_core/general_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@

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)

0 comments on commit d9127d7

Please sign in to comment.