nimi-python icon indicating copy to clipboard operation
nimi-python copied to clipboard

Returned parameter which is marked as unused in Python API still gets codegen-ed into the documentation

Open sbethur opened this issue 2 years ago • 1 comments

There is an existing bug with the codegen logic where return parameter which is marked as unused in Python API (i.e. by specifying 'use_in_python_api': False in python/functions/functions.hapigen) still gets codegen-ed into the documentation image although it no longer gets returned by the actual code:

return [ni_lcr_measurement.NILCRMeasurement(measurements_ctype[i]) for i in range(count_ctype.value)]

Include relevant system information, steps to reproduce, and any workarounds.

sbethur avatar Mar 17 '22 21:03 sbethur

My guess: change this line: https://github.com/ni/nimi-python/blob/f3324c733daaa52f7d7d2cc6a131d2268f77404d/build/helper/metadata_filters.py#L251

to if x['direction'] == 'out' and (options_to_use['skip_output_parameters'] or not x['use_in_python_api']):

ni-jfitzger avatar Sep 07 '22 17:09 ni-jfitzger

Fixed by #1822

ni-jfitzger avatar Mar 23 '23 16:03 ni-jfitzger

Fixed by #1822

ni-jfitzger avatar Mar 23 '23 16:03 ni-jfitzger