From 7a6d2fb66e04d13e00517e50285d748e93169ebe Mon Sep 17 00:00:00 2001 From: Scott Sanderson Date: Fri, 11 Mar 2016 15:28:41 -0500 Subject: [PATCH] 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. --- zipline/pipeline/factors/factor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zipline/pipeline/factors/factor.py b/zipline/pipeline/factors/factor.py index a77ac87c..e9df98e8 100644 --- a/zipline/pipeline/factors/factor.py +++ b/zipline/pipeline/factors/factor.py @@ -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