DocStrings

Use doc strings when writing scripts for better documentation and to assist auto-complete documentation tooltips. For instance, this example function script:

def func1(parms):
	'''
    Helpful descriptions to help others understand your code.
	Note: will show up in autofill details, so keep it concise.

	Args:
		parms (dict): Small note explaining the param if necessary.

	Returns:
		tuple: Small explanations of the return
		
     '''
     return parms

Will show up in the script editor when using auto-complete like this:

image.png

The following datatypes are supported for arguments and returns:

Source: https://forum.inductiveautomation.com/t/dos-and-donts-when-developing-first-project-with-ignition/93592/35


Revision #2
Created 25 September 2024 00:42:06 by Michael Flagler
Updated 25 September 2024 00:46:39 by Michael Flagler