mirror of
https://github.com/wassname/catalyst.git
synced 2026-06-29 01:25:54 +08:00
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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user