Skip to content

SCR202: system-function-arity

system.* call with arguments that match no signature

Code SCR202
Name system-function-arity
Category Scripts (SCR)
Default severity error
Enabled by default yes
Fix available no
ign-lint equivalent none

Checks calls to system.* functions (also through aliases such as tag = system.tag) against every signature the function has in the scope the script runs in: too many or too few positional arguments, a required argument missing, or (for functions written in Python) the same argument given twice. Unknown keyword arguments are SCR203. A Java @KeywordArgs function given the same argument positionally and by keyword is not reported: some of them keep the keyword's value.

The signatures were measured on a real 8.3 gateway. Calls are not checked when they unpack arguments (f(*args), f(**kwargs)), when the stubs do not know the function's parameters, or when a Java signature ends in an array parameter (Jython may accept it as variable arguments). A keyword parameter only counts as required when calling without it was observed to fail.

Library modules run in the scope of their caller, so a call in a library module is only reported when it fails in every scope where the function exists.

Jython raises TypeError when the call runs.

def runAction(self, event):
values = system.tag.readBlocking("[default]A", "[default]B", 5000)

Use instead:

def runAction(self, event):
values = system.tag.readBlocking(["[default]A", "[default]B"], 5000)

Generated from the rule metadata by iglint generate-docs; iglint rule SCR202 prints the same page in the terminal. Source: docs/rules/SCR202.md.