Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QA] investigate why pylance shows linting error for get_answers #25557

Closed
kristapratico opened this issue Aug 4, 2022 · 6 comments · Fixed by #26452
Closed

[QA] investigate why pylance shows linting error for get_answers #25557

kristapratico opened this issue Aug 4, 2022 · 6 comments · Fixed by #26452
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Cognitive - Language Cognitive - QnA Maker
Milestone

Comments

@kristapratico
Copy link
Member

image

@kristapratico kristapratico added Client This issue points to a problem in the data-plane of the library. Cognitive - QnA Maker Cognitive - Language labels Aug 4, 2022
@kristapratico kristapratico self-assigned this Aug 4, 2022
@github-actions github-actions bot added the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Aug 4, 2022
@azure-sdk
Copy link
Collaborator

Label prediction was below confidence level 0.6 for Model:ServiceLabels: 'Compute:0.13728407,Storage:0.07206131,EngSys:0.06978722'

@kristapratico kristapratico removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Aug 4, 2022
@kristapratico kristapratico added this to the 2022-09 milestone Aug 5, 2022
@wonhyeongseo
Copy link
Contributor

Hello, @kristapratico!

Shouldn't a simple change to the argument name be enough?
short_answer_options -> options
I made a #25833 with this change. May you please check it out?

Thank you!

@kristapratico
Copy link
Member Author

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 #25557 (comment). Let me know if you're up for trying that script, happy to help.

@wonhyeongseo
Copy link
Contributor

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?

@kristapratico
Copy link
Member Author

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?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. Cognitive - Language Cognitive - QnA Maker
Projects
4 participants