Hello @jackscodemonkey,
I am using this (really cool) package to document some SQL scripts, but I get a strange error when I try to document an SQL function:
AttributeError: 'types.SimpleNamespace' object has no attribute 'return_type'
I had a look in the source code and it seems like the package gives for granted that there should be a return_type attribute when working with SQL functions.
if core_text.type == "FUNCTION":
section += n.line(
"RETURNS: {}".format(core_text.comments.return_type),
"RETURNS: {}".format(core_text.comments.return_type),
)
Adding a check like hasattr(core_text.comments, "return_type") in the if clause seems to work.
If you think that I am doing something wrong in my documentation comment, please let me know, thanks!
Hello @jackscodemonkey,
I am using this (really cool) package to document some SQL scripts, but I get a strange error when I try to document an SQL function:
AttributeError: 'types.SimpleNamespace' object has no attribute 'return_type'
I had a look in the source code and it seems like the package gives for granted that there should be a return_type attribute when working with SQL functions.
Adding a check like hasattr(core_text.comments, "return_type") in the if clause seems to work.
If you think that I am doing something wrong in my documentation comment, please let me know, thanks!