properly check command arguments #6
{{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
-
Owner
``` mergeld be
👍 -
357 raise AttributeError(u'Command not found: %s (%s)' % (command, e)) 358 359 if not isinstance(func, FunctionType): 360 raise AttributeError("Command refers to non-static method %s." % 361 unicode(func)) 362 363 # check for unexpected keyword arguments 364 argspec = getargspec(func) 365 if argspec.keywords is None: # _operation doesn't take ** args 366 unexpected_kwargs = set(args) - set(argspec.args) 367 if unexpected_kwargs: 368 raise TypeError( 369 "Command %s got unexpected keyword arguments: %s" % ( 370 unicode(func), ", ".join(unexpected_kwargs))) 371 372 if argspec.defaults: -
Owner
this part could be outside the
if
body
-