Skip to content

fixing Pylint errors

1007da5
Select commit
Loading
Failed to load commit list.
Closed

feed range query fix #46506

fixing Pylint errors
1007da5
Select commit
Loading
Failed to load commit list.
Azure Pipelines / python - cosmos - ci failed May 3, 2026 in 1h 14m 45s

Build #20260503.1 had test failures

Details

Tests

  • Failed: 107 (0.99%)
  • Passed: 10,657 (98.41%)
  • Other: 65 (0.60%)
  • Total: 10,829

Annotations

Check failure on line 27 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - cosmos - ci

Build log #L27

There are one or more test failures detected in result files. Detailed summary of published test results can be viewed in the Tests tab.

Check failure on line 22 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - cosmos - ci

Build log #L22

There are one or more test failures detected in result files. Detailed summary of published test results can be viewed in the Tests tab.

Check failure on line 6521 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - cosmos - ci

Build log #L6521

PowerShell exited with code '1'.

Check failure on line 27 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - cosmos - ci

Build log #L27

There are one or more test failures detected in result files. Detailed summary of published test results can be viewed in the Tests tab.

Check failure on line 1 in test_mwr_all_regions_down_async

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - cosmos - ci

test_mwr_all_regions_down_async

asyncio.exceptions.TimeoutError
Raw output
args = (<DatabaseProxy [dbs/PythonSDKTestDatabase-a9b97f2f-2759-4c88-8a9f-8773f61748c6]>, 'test_fault_injection_transport_async.pyd8979759-a32e-4c25-82a2-c7feb60db4f4')
kwargs = {'partition_key': <PartitionKey [/pk]>}, merge_span = False
passed_in_parent = None, span_impl_type = None

    @functools.wraps(func)
    async def wrapper_use_tracer(*args: Any, **kwargs: Any) -> T:
        merge_span = kwargs.pop("merge_span", False)
        passed_in_parent = kwargs.pop("parent_span", None)
    
        span_impl_type = settings.tracing_implementation()
        if span_impl_type is None:
>           return await func(*args, **kwargs)

..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\core\tracing\decorator_async.py:77: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_database.py:446: in create_container
    data = await self.client_connection.CreateContainer(
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_cosmos_client_connection_async.py:618: in CreateContainer
    return await self.Create(collection, path, http_constants.ResourceType.Collection, database_id, None,
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_cosmos_client_connection_async.py:857: in Create
    result, last_response_headers = await self.__Post(path, request_params, body, headers, **kwargs)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_cosmos_client_connection_async.py:1032: in __Post
    return await asynchronous_request.AsynchronousRequest(
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_asynchronous_request.py:241: in AsynchronousRequest
    return await _retry_utility_async.ExecuteAsync(
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_retry_utility_async.py:139: in ExecuteAsync
    result = await ExecuteFunctionAsync(function, global_endpoint_manager, *args, **kwargs)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_retry_utility_async.py:348: in ExecuteFunctionAsync
    return await function(*args, **kwargs)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_asynchronous_request.py:127: in _Request
    response = await _PipelineRunFunction(
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_asynchronous_request.py:171: in _PipelineRunFunction
    return await pipeline_client._pipeline.run(request, **kwargs)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\core\pipeline\_base_async.py:221: in run
    return await first_node.send(pipeline_request)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\core\pipeline\_base_async.py:69: in send
    response = await self.next.send(request)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\core\pipeline\_base_async.py:69: in send
    response = await self.next.send(request)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\core\pipeline\_base_async.py:69: in send
    response = await self.next.send(request)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\core\pipeline\_base_async.py:69: in send
    response = await self.next.send(request)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_retry_utility_async.py:381: in send
    response = await self.next.send(request)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\core\pipeline\_base_async.py:69: in send
    response = await self.next.send(request)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\core\pipeline\_base_async.py:69: in send
    response = await self.next.send(request)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\core\pipeline

Check failure on line 1 in test_mwr_region_down_succeeds_async

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - cosmos - ci

test_mwr_region_down_succeeds_async

azure.cosmos.exceptions.CosmosResourceExistsError: (Conflict) Message: {"Errors":["Resource with specified id, name, or unique index already exists."]}
ActivityId: 43439b31-5d51-42b6-ba89-a342af462879, Request URI: /apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0
Code: Conflict
Message: Message: {"Errors":["Resource with specified id, name, or unique index already exists."]}
ActivityId: 43439b31-5d51-42b6-ba89-a342af462879, Request URI: /apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0
Raw output
cls = <class 'test_fault_injection_transport_async.TestFaultInjectionTransportAsync'>

    @classmethod
    async def asyncSetUp(cls):
        logger.info("starting class: {} execution".format(cls.__name__))
        cls.host = host
        cls.master_key = master_key
    
        if (cls.master_key == '[YOUR_KEY_HERE]' or
                cls.host == '[YOUR_ENDPOINT_HERE]'):
            raise Exception(
                "You must specify your Azure Cosmos account values for "
                "'masterKey' and 'host' at the top of this class to run the "
                "tests.")
        cls.database_id = TEST_DATABASE_ID
        cls.single_partition_container_name = SINGLE_PARTITION_CONTAINER_NAME
    
        cls.mgmt_client = CosmosClient(cls.host, cls.master_key, consistency_level="Session", logger=logger)
        created_database = cls.mgmt_client.get_database_client(cls.database_id)
>       await asyncio.wait_for(
            created_database.create_container(
                cls.single_partition_container_name,
                partition_key=PartitionKey("/pk")),
            MGMT_TIMEOUT)

tests\test_fault_injection_transport_async.py:59: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\hostedtoolcache\windows\Python\3.10.16\x64\lib\asyncio\tasks.py:445: in wait_for
    return fut.result()
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\core\tracing\decorator_async.py:77: in wrapper_use_tracer
    return await func(*args, **kwargs)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_database.py:446: in create_container
    data = await self.client_connection.CreateContainer(
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_cosmos_client_connection_async.py:618: in CreateContainer
    return await self.Create(collection, path, http_constants.ResourceType.Collection, database_id, None,
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_cosmos_client_connection_async.py:857: in Create
    result, last_response_headers = await self.__Post(path, request_params, body, headers, **kwargs)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_cosmos_client_connection_async.py:1032: in __Post
    return await asynchronous_request.AsynchronousRequest(
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_asynchronous_request.py:241: in AsynchronousRequest
    return await _retry_utility_async.ExecuteAsync(
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_retry_utility_async.py:139: in ExecuteAsync
    result = await ExecuteFunctionAsync(function, global_endpoint_manager, *args, **kwargs)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_retry_utility_async.py:348: in ExecuteFunctionAsync
    return await function(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

global_endpoint_manager = <azure.cosmos.aio._global_partition_endpoint_manager_per_partition_automatic_failover_async._GlobalPartitionEndpointManagerForPerPartitionAutomaticFailoverAsync object at 0x000001F92650B790>
request_params = <azure.cosmos._request_object.RequestObject object at 0x000001F92338EE60>
connection_policy = <azure.cosmos.documents.ConnectionPolicy object at 0x000001F92650A020>
pipeline_client = <azure.core._pipeline_client_async.AsyncPipelineClient object at 0x000001F92338D090>
request = <HttpRequest [POST], url: 'https://localhost:8081/dbs/PythonSDKTestDatabase-a9b97f2f-2759-4c88-8a9f-8773f61748c6/colls/'>
kwargs = {}, connection_timeout = 5, read_timeout = 65, client_timeout = None
start_time = 1777824872.800602, base_url = 'https://localhost:8081/'
pk_range_wrapper = None
parse_result = ParseResult(scheme='https', netloc='localhost:8081', path='/dbs/PythonSDKTestDatabase-a9b97f2f-2759-4c88-8a9f-8773f61748c6/colls/', params='',

Check failure on line 1 in test_mwr_succeeds_async

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - cosmos - ci

test_mwr_succeeds_async

azure.cosmos.exceptions.CosmosResourceExistsError: (Conflict) Message: {"Errors":["Resource with specified id, name, or unique index already exists."]}
ActivityId: 0cdde196-7679-4fdb-bb25-8f493814d81c, Request URI: /apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0
Code: Conflict
Message: Message: {"Errors":["Resource with specified id, name, or unique index already exists."]}
ActivityId: 0cdde196-7679-4fdb-bb25-8f493814d81c, Request URI: /apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0
Raw output
cls = <class 'test_fault_injection_transport_async.TestFaultInjectionTransportAsync'>

    @classmethod
    async def asyncSetUp(cls):
        logger.info("starting class: {} execution".format(cls.__name__))
        cls.host = host
        cls.master_key = master_key
    
        if (cls.master_key == '[YOUR_KEY_HERE]' or
                cls.host == '[YOUR_ENDPOINT_HERE]'):
            raise Exception(
                "You must specify your Azure Cosmos account values for "
                "'masterKey' and 'host' at the top of this class to run the "
                "tests.")
        cls.database_id = TEST_DATABASE_ID
        cls.single_partition_container_name = SINGLE_PARTITION_CONTAINER_NAME
    
        cls.mgmt_client = CosmosClient(cls.host, cls.master_key, consistency_level="Session", logger=logger)
        created_database = cls.mgmt_client.get_database_client(cls.database_id)
>       await asyncio.wait_for(
            created_database.create_container(
                cls.single_partition_container_name,
                partition_key=PartitionKey("/pk")),
            MGMT_TIMEOUT)

tests\test_fault_injection_transport_async.py:59: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\hostedtoolcache\windows\Python\3.10.16\x64\lib\asyncio\tasks.py:445: in wait_for
    return fut.result()
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\core\tracing\decorator_async.py:77: in wrapper_use_tracer
    return await func(*args, **kwargs)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_database.py:446: in create_container
    data = await self.client_connection.CreateContainer(
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_cosmos_client_connection_async.py:618: in CreateContainer
    return await self.Create(collection, path, http_constants.ResourceType.Collection, database_id, None,
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_cosmos_client_connection_async.py:857: in Create
    result, last_response_headers = await self.__Post(path, request_params, body, headers, **kwargs)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_cosmos_client_connection_async.py:1032: in __Post
    return await asynchronous_request.AsynchronousRequest(
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_asynchronous_request.py:241: in AsynchronousRequest
    return await _retry_utility_async.ExecuteAsync(
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_retry_utility_async.py:139: in ExecuteAsync
    result = await ExecuteFunctionAsync(function, global_endpoint_manager, *args, **kwargs)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_retry_utility_async.py:348: in ExecuteFunctionAsync
    return await function(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

global_endpoint_manager = <azure.cosmos.aio._global_partition_endpoint_manager_per_partition_automatic_failover_async._GlobalPartitionEndpointManagerForPerPartitionAutomaticFailoverAsync object at 0x000001F922A57C10>
request_params = <azure.cosmos._request_object.RequestObject object at 0x000001F92A643130>
connection_policy = <azure.cosmos.documents.ConnectionPolicy object at 0x000001F9264E0610>
pipeline_client = <azure.core._pipeline_client_async.AsyncPipelineClient object at 0x000001F926509780>
request = <HttpRequest [POST], url: 'https://localhost:8081/dbs/PythonSDKTestDatabase-a9b97f2f-2759-4c88-8a9f-8773f61748c6/colls/'>
kwargs = {}, connection_timeout = 5, read_timeout = 65, client_timeout = None
start_time = 1777824873.2915275, base_url = 'https://localhost:8081/'
pk_range_wrapper = None
parse_result = ParseResult(scheme='https', netloc='localhost:8081', path='/dbs/PythonSDKTestDatabase-a9b97f2f-2759-4c88-8a9f-8773f61748c6/colls/', params=''

Check failure on line 1 in test_swr_mrr_all_regions_down_for_read_async

See this annotation in the file changed.

@azure-pipelines azure-pipelines / python - cosmos - ci

test_swr_mrr_all_regions_down_for_read_async

azure.cosmos.exceptions.CosmosResourceExistsError: (Conflict) Message: {"Errors":["Resource with specified id, name, or unique index already exists."]}
ActivityId: fbaf365a-1763-46fe-97ec-3cd8293c5f6f, Request URI: /apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0
Code: Conflict
Message: Message: {"Errors":["Resource with specified id, name, or unique index already exists."]}
ActivityId: fbaf365a-1763-46fe-97ec-3cd8293c5f6f, Request URI: /apps/DocDbApp/services/DocDbMaster0/partitions/780e44f4-38c8-11e6-8106-8cdcd42c33be/replicas/1p/, RequestStats: , SDK: Microsoft.Azure.Documents.Common/2.14.0
Raw output
cls = <class 'test_fault_injection_transport_async.TestFaultInjectionTransportAsync'>

    @classmethod
    async def asyncSetUp(cls):
        logger.info("starting class: {} execution".format(cls.__name__))
        cls.host = host
        cls.master_key = master_key
    
        if (cls.master_key == '[YOUR_KEY_HERE]' or
                cls.host == '[YOUR_ENDPOINT_HERE]'):
            raise Exception(
                "You must specify your Azure Cosmos account values for "
                "'masterKey' and 'host' at the top of this class to run the "
                "tests.")
        cls.database_id = TEST_DATABASE_ID
        cls.single_partition_container_name = SINGLE_PARTITION_CONTAINER_NAME
    
        cls.mgmt_client = CosmosClient(cls.host, cls.master_key, consistency_level="Session", logger=logger)
        created_database = cls.mgmt_client.get_database_client(cls.database_id)
>       await asyncio.wait_for(
            created_database.create_container(
                cls.single_partition_container_name,
                partition_key=PartitionKey("/pk")),
            MGMT_TIMEOUT)

tests\test_fault_injection_transport_async.py:59: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\hostedtoolcache\windows\Python\3.10.16\x64\lib\asyncio\tasks.py:445: in wait_for
    return fut.result()
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\core\tracing\decorator_async.py:77: in wrapper_use_tracer
    return await func(*args, **kwargs)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_database.py:446: in create_container
    data = await self.client_connection.CreateContainer(
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_cosmos_client_connection_async.py:618: in CreateContainer
    return await self.Create(collection, path, http_constants.ResourceType.Collection, database_id, None,
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_cosmos_client_connection_async.py:857: in Create
    result, last_response_headers = await self.__Post(path, request_params, body, headers, **kwargs)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_cosmos_client_connection_async.py:1032: in __Post
    return await asynchronous_request.AsynchronousRequest(
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_asynchronous_request.py:241: in AsynchronousRequest
    return await _retry_utility_async.ExecuteAsync(
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_retry_utility_async.py:139: in ExecuteAsync
    result = await ExecuteFunctionAsync(function, global_endpoint_manager, *args, **kwargs)
..\..\..\.venv\azure-cosmos\.venv_mindependency\lib\site-packages\azure\cosmos\aio\_retry_utility_async.py:348: in ExecuteFunctionAsync
    return await function(*args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

global_endpoint_manager = <azure.cosmos.aio._global_partition_endpoint_manager_per_partition_automatic_failover_async._GlobalPartitionEndpointManagerForPerPartitionAutomaticFailoverAsync object at 0x000001F92649F8E0>
request_params = <azure.cosmos._request_object.RequestObject object at 0x000001F92A578190>
connection_policy = <azure.cosmos.documents.ConnectionPolicy object at 0x000001F92649D3C0>
pipeline_client = <azure.core._pipeline_client_async.AsyncPipelineClient object at 0x000001F92338F3A0>
request = <HttpRequest [POST], url: 'https://localhost:8081/dbs/PythonSDKTestDatabase-a9b97f2f-2759-4c88-8a9f-8773f61748c6/colls/'>
kwargs = {}, connection_timeout = 5, read_timeout = 65, client_timeout = None
start_time = 1777824873.8819306, base_url = 'https://localhost:8081/'
pk_range_wrapper = None
parse_result = ParseResult(scheme='https', netloc='localhost:8081', path='/dbs/PythonSDKTestDatabase-a9b97f2f-2759-4c88-8a9f-8773f61748c6/colls/', params=''