We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import trafaret as trf @trf.guard(a=trf.Int) def foo(*, a=1): pass foo() # GuardError: {'a': DataError('is required')}
problem related to defaults property from FullArgSpec class
defaults
FullArgSpec
def foo(*, a=1): pass def bar(a=1): pass getargspec(foo) # FullArgSpec(args=[], varargs=None, varkw=None, defaults=None, kwonlyargs=['a'], kwonlydefaults={'a': 1}, annotations={}) getargspec(bar) # FullArgSpec(args=['a'], varargs=None, varkw=None, defaults=(1,), kwonlyargs=[], kwonlydefaults=None, annotations={})
https://github.com/Deepwalker/trafaret/blob/master/trafaret/base.py#L1493-L1496
here we need try to use the kwonlydefaults mapping
kwonlydefaults
The text was updated successfully, but these errors were encountered:
committed some code, will make a release soon
Sorry, something went wrong.
pls check 2.1.1 btw if you like this project, maybe we can convert into org etc.
thx, i will check
No branches or pull requests
problem related to
defaults
property fromFullArgSpec
classhttps://github.com/Deepwalker/trafaret/blob/master/trafaret/base.py#L1493-L1496
here we need try to use the
kwonlydefaults
mappingThe text was updated successfully, but these errors were encountered: