mirror of
https://github.com/graphql-python/graphene.git
synced 2025-05-04 00:13:40 +03:00
fix mypy error
This commit is contained in:
parent
c23ff11220
commit
0cc7bb7748
|
@ -24,12 +24,13 @@ def deprecated(reason):
|
|||
# @deprecated("please, use another function")
|
||||
# def old_function(x, y):
|
||||
# pass
|
||||
reason = reason.decode() if isinstance(reason, bytes) else reason
|
||||
|
||||
def decorator(func1):
|
||||
if inspect.isclass(func1):
|
||||
fmt1 = f"Call to deprecated class {func1.__name__} ({reason.decode()})."
|
||||
fmt1 = f"Call to deprecated class {func1.__name__} ({reason})."
|
||||
else:
|
||||
fmt1 = f"Call to deprecated function {func1.__name__} ({reason.decode()})."
|
||||
fmt1 = f"Call to deprecated function {func1.__name__} ({reason})."
|
||||
|
||||
@functools.wraps(func1)
|
||||
def new_func1(*args, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue
Block a user