Skip to content

Inaccurate type comment in functions for azure-cosmos package #12570

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

Closed
sl-sandy opened this issue Jul 16, 2020 · 3 comments · Fixed by #12598
Closed

Inaccurate type comment in functions for azure-cosmos package #12570

sl-sandy opened this issue Jul 16, 2020 · 3 comments · Fixed by #12598
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@sl-sandy
Copy link

  • Package Name: azure-cosmos
  • Package Version: 4.0.0
  • Operating System: win10
  • Python Version: 3.8

Describe the bug
For the query related functions in container.py which has the optional "parameters", all theses functions comment the parameters with type Optional[List[str]]. This leads to code highlit and warning in IDE.

To Reproduce
Steps to reproduce the behavior:

container.query_items(

    query='SELECT * FROM products p WHERE p.productModel = @model',

        parameters=[

            dict(name='@model', value='Model 7')

        ],

    enable_cross_partition_query=True

)

When using this demo code, IDE will give a warning on the type of "parameters".

Expected behavior
Change the type comment of "parameters" of query functions to Optional[List[dict]].

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Jul 16, 2020
@kaerm kaerm added Client This issue points to a problem in the data-plane of the library. Cosmos labels Jul 16, 2020
@ghost ghost removed the needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. label Jul 16, 2020
@kaerm
Copy link
Contributor

kaerm commented Jul 16, 2020

@sl-sandy thanks for reporting this, adding @southpolesteve and @annatisch to take a look at this

@lmazuel lmazuel added this to the Backlog milestone Jul 16, 2020
@notlaforge
Copy link
Contributor

@sl-sandy which IDE were you using?

@sl-sandy
Copy link
Author

@notlaforge My IDE is the Pycharm community. I tried version 2019.3 and 2020.1 and both can reproduce this.

@lmazuel lmazuel modified the milestones: Backlog, [2020] August Jul 20, 2020
openapi-sdkautomation bot pushed a commit to AzureSDKAutomation/azure-sdk-for-python that referenced this issue Feb 20, 2021
fixing NRP networking resource properties (Azure#12570)

* fixing NRP networking resource properties

* fixing natgateway and privatelinkservice references

* adding custom word privatelinkservice

* virtualnetwork prettier fix

* added custom word natgateway

* added more missing resource properties as per S360

* correct natgateway reference

* revert 'Error' property casing

* fix linkedpublicipaddress property

* adding enum values

* added prefixes and prettier check done

* added prefix for 2 properties
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2023
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. Cosmos customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants