You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the BadKwargUseLinter helper we can observe the following behavior:
deffunc(a, b='foo'):
# ...returna*bfunc(1, b='bar') # Caught with BadKwargUseLinterfunc(2, 'bar') # Uncaught with BadKwargUseLinter
That is, kwargs passed as positional arguments will not be caught by BadKwargUseLinter. We could remedy this by supporting an additional piece of configuration in the BadKwargUseLinter.kwargs property. If we took another, optional configuration option like position we could detect this behavior.
This is somewhat of a fringe use-case. It may not be worth it to try and maintain the position of function kwargs since they could easily change out from underneath us.
The text was updated successfully, but these errors were encountered:
In the
BadKwargUseLinter
helper we can observe the following behavior:That is, kwargs passed as positional arguments will not be caught by
BadKwargUseLinter
. We could remedy this by supporting an additional piece of configuration in theBadKwargUseLinter.kwargs
property. If we took another, optional configuration option likeposition
we could detect this behavior.This is somewhat of a fringe use-case. It may not be worth it to try and maintain the position of function kwargs since they could easily change out from underneath us.
The text was updated successfully, but these errors were encountered: