MAINT: Use more specific signature in decorator.

`if_not_float64_tell_caller_to_use_isnull` can't take additional
arguments, and accepting *args/**kwargs causes Sphinx to generate an
incorrect signature for decorated methods.
This commit is contained in:
Scott Sanderson
2016-03-11 15:28:41 -05:00
parent 4f0babc558
commit 7a6d2fb66e
+2 -2
View File
@@ -326,7 +326,7 @@ def if_not_float64_tell_caller_to_use_isnull(f):
directing the user to `isnull` or `notnull` instead.
"""
@wraps(f)
def wrapped_method(self, *args, **kwargs):
def wrapped_method(self):
if self.dtype != float64_dtype:
raise TypeError(
"{meth}() was called on a factor of dtype {dtype}.\n"
@@ -336,7 +336,7 @@ def if_not_float64_tell_caller_to_use_isnull(f):
dtype=self.dtype,
),
)
return f(self, *args, **kwargs)
return f(self)
return wrapped_method