Do's and Don'ts when developing First Project with Ignition?

Adding to what you said @Julian_Islic .

I normally do this good practice:

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

And will show something like this when previewed:
image

You could have multiple parameters listed there with the corresponding type and description. I belive the available types are int, float, bool, str, tuple, list, dict and any.

Also I think it's possible to only show the type without the description, but I wasn't able to do it.

image

Make sure to make short and specifics descriptions. This is not the place to explain in detail how the functions works.

3 Likes