Skip to content

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

Description

@sl-sandy
  • 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]].

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

ClientThis issue points to a problem in the data-plane of the library.Cosmoscustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions