28 deprecation_warning=True):
29 if deprecation_warning:
31 if args_to_process
is None:
33 keyword = keyword.__name__
34 if libname
not in self.
_libs_libs:
35 self.
_libs_libs[libname] = NormalizedDict(ignore=[
'_'])
36 self.
_libs_libs[libname][keyword] =
int(args_to_process)
39 return (
"The API to register run keyword variants and to disable "
40 "variable resolving in keyword arguments will change in Robot "
41 "Framework 3.1. For more information see issue #2190 <"
42 "https://github.com/robotframework/robotframework/issues/2190"
43 ">. Use with 'deprecation_warning=False' to avoid related "
44 "deprecation warnings.")
47 if libname
in self.
_libs_libs
and kwname
in self.
_libs_libs[libname]:
48 return self.
_libs_libs[libname][kwname]
56 raise RuntimeError(
'Cannot determine arguments to process '
57 'automatically in Python 3.')
58 if inspect.ismethod(method):
59 return method.__code__.co_argcount - 1
60 elif inspect.isfunction(method):
61 return method.__code__.co_argcount
62 raise ValueError(
'Needs function or method')
def get_args_to_process(self, libname, kwname)
def _deprecation_warning(self)
def _get_args_from_method(self, method)
def register_run_keyword(self, libname, keyword, args_to_process=None, deprecation_warning=True)
def is_run_keyword(self, libname, kwname)