[QA] investigate why pylance shows linting error for get_answers

Label prediction was below confidence level 0.6 for Model:ServiceLabels: 'Compute:0.13728407,Storage:0.07206131,EngSys:0.06978722'
This may be solved by using the autorest postprocessing script: https://github.com/Azure/autorest.python/blob/autorestv3/docs/customizations.md#postprocessing
This regenerates the imports in the init: https://github.com/Azure/autorest.python/blob/autorestv3/packages/autorest.python/test/dpg/version-tolerant/Expected/AcceptanceTests/DPGCustomizationCustomizedVersionTolerant/dpgcustomizationcustomizedversiontolerant/_operations/init.py
Hello, @kristapratico!
Shouldn't a simple change to the argument name be enough?
short_answer_options -> options
I made a https://github.com/Azure/azure-sdk-for-python/pull/25833 with this change. May you please check it out?
Thank you!
Hey @wonhyeongseo thanks for taking a look at this issue. short_answer_options is the correct name for this keyword argument. We can't change the name to options because 1) this is a breaking change for our customers and 2) get_answers already takes a positional argument called options which accepts an AnswersOptions type. That being said, the error is arising from a naming clash in the generated code vs the patched code. To fix this, we will need to regenerate the code using the post-processing script mentioned in https://github.com/Azure/azure-sdk-for-python/issues/25557#issuecomment-1207091007. Let me know if you're up for trying that script, happy to help.
Hello @kristapratico! Thank you for your guidance. I tried to edit the _patch.py to no avail. I stumbled upon this thread in pylint. It seems the problem came up 22 days ago. Can it be a pylint bug?
Hey @wonhyeongseo I think the post-processing script edits the __init__ file, not the _patch.py. Can you elaborate on what problem you ran into?