@@ -222,7 +222,7 @@ def __init__(self, *args, **kwargs):
222
222
223
223
self .__doc__ = getattr (func , '__doc__' , None )
224
224
self .__name__ = getattr (func , '__name__' , '<curry>' )
225
- self .__module__ = getattr (func , '__module__' , None )
225
+ self .__module__ = getattr (func , '__module__' , None ) # pyright: ignore
226
226
self .__qualname__ = getattr (func , '__qualname__' , None )
227
227
self ._sigspec = None
228
228
self ._has_unknown_args = None
@@ -241,7 +241,7 @@ def __signature__(self):
241
241
242
242
params = list (sig .parameters .values ())
243
243
skip = 0
244
- for param in params [:len (args )]:
244
+ for param in params [:len (args )]: # pyright: ignore
245
245
if param .kind == param .VAR_POSITIONAL :
246
246
break
247
247
skip += 1
@@ -256,8 +256,8 @@ def __signature__(self):
256
256
elif kind == param .VAR_POSITIONAL :
257
257
if kwonly :
258
258
continue
259
- elif param .name in keywords :
260
- default = keywords [param .name ]
259
+ elif param .name in keywords : # pyright: ignore
260
+ default = keywords [param .name ] # pyright: ignore
261
261
kind = param .KEYWORD_ONLY
262
262
kwonly = True
263
263
else :
@@ -311,7 +311,7 @@ def _should_curry(self, args, kwargs, exc=None):
311
311
func = self .func
312
312
args = self .args + args
313
313
if self .keywords :
314
- kwargs = dict (self .keywords , ** kwargs )
314
+ kwargs = dict (self .keywords , ** kwargs ) # pyright: ignore
315
315
if self ._sigspec is None :
316
316
sigspec = self ._sigspec = _sigs .signature_or_spec (func )
317
317
self ._has_unknown_args = has_varargs (func , sigspec ) is not False
@@ -390,7 +390,7 @@ def _restore_curry(cls, func, args, kwargs, userdict, is_decorated):
390
390
391
391
392
392
@curry
393
- def memoize (func , cache = None , key = None ):
393
+ def memoize (func , cache = None , key = None ): # pyright: ignore
394
394
""" Cache a function's result for speedy future evaluation
395
395
396
396
Considerations:
@@ -442,7 +442,7 @@ def memoize(func, cache=None, key=None):
442
442
def key (args , kwargs ):
443
443
return args [0 ]
444
444
elif may_have_kwargs :
445
- def key (args , kwargs ):
445
+ def key (args , kwargs ): # pyright: ignore
446
446
return (
447
447
args or None ,
448
448
frozenset (kwargs .items ()) if kwargs else None ,
@@ -495,7 +495,7 @@ def __getstate__(self):
495
495
def __setstate__ (self , state ):
496
496
self .first , self .funcs = state
497
497
498
- @instanceproperty (classval = __doc__ )
498
+ @instanceproperty (classval = __doc__ ) # pyright: ignore
499
499
def __doc__ (self ):
500
500
def composed_doc (* fs ):
501
501
"""Generate a docstring for the composition of fs.
@@ -776,7 +776,7 @@ def __call__(self, *args, **kwargs):
776
776
except self .exc as e :
777
777
return self .handler (e )
778
778
779
- @instanceproperty (classval = __doc__ )
779
+ @instanceproperty (classval = __doc__ ) # pyright: ignore
780
780
def __doc__ (self ):
781
781
from textwrap import dedent
782
782
0 commit comments