-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
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
don't pass down 'max_ver' as keyword to fancylogger.deprecated #1899
Conversation
ok, can you add a test case that would have triggered this? |
@JensTimmerman good point, adding tests made me realise there was another issue in please rerereview? |
max_ver = kwargs.pop('max_ver', None) | ||
if max_ver is None and args: | ||
max_ver = args[0] | ||
args = args[1:] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you have no way to know that max_ver will be args[0], so please don't do this, if you expect it,
make the function definition
def deprecated(self, msg, ver, max_ver=None,*args, **kwargs):
`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point, thanks
looks good to me |
Thanks for the review @JensTimmerman! |
This should have been part of #1896...
@JensTimmerman please review?