Skip to content

[Storage] _queue_client_async.py mypy fixes #29824

Merged
vincenttran-msft merged 12 commits intoAzure:feature/storage-queue-typingfrom
vincenttran-msft:vincenttran/mypy_queue_2
May 3, 2023
Merged

[Storage] _queue_client_async.py mypy fixes #29824
vincenttran-msft merged 12 commits intoAzure:feature/storage-queue-typingfrom
vincenttran-msft:vincenttran/mypy_queue_2

Conversation

@vincenttran-msft
Copy link
Member

@vincenttran-msft vincenttran-msft commented Apr 11, 2023

Merging this with these MyPy errors still in place as next PR will be decoupling async and sync clients (and will inherently resolve these):

  • _queue_client_async.py:97: error: Incompatible types in assignment (expression has type "azure.storage.queue._generated.aio._azure_queue_storage.AzureQueueStorage", variable has type "azure.storage.queue._generated._azure_queue_storage.AzureQueueStorage") [assignment]
  • _queue_client_async.py:140: error: Incompatible types in "await" (actual type "None", expected type "Awaitable[Any]") [misc]
  • _queue_client_async.py:177: error: Incompatible types in "await" (actual type "None", expected type "Awaitable[Any]") [misc]
  • _queue_client_async.py:203: error: Incompatible types in "await" (actual type "None", expected type "Awaitable[Any]") [misc]
  • _queue_client_async.py:244: error: Incompatible types in "await" (actual type "None", expected type "Awaitable[Any]") [misc]
  • _queue_client_async.py:266: error: Incompatible types in "await" (actual type "List[SignedIdentifier]", expected type "Awaitable[Any]") [misc]
  • _queue_client_async.py:326: error: Incompatible types in "await" (actual type "None", expected type "Awaitable[Any]") [misc]
  • _queue_client_async.py:409: error: Incompatible types in "await" (actual type "List[EnqueuedMessage]", expected type "Awaitable[Any]") [misc]
  • _queue_client_async.py:475: error: Incompatible types in "await" (actual type "List[DequeuedMessageItem]", expected type "Awaitable[Any]") [misc]
  • _queue_client_async.py:670: error: Incompatible types in "await" (actual type "None", expected type "Awaitable[Any]") [misc]
  • _queue_client_async.py:743: error: Incompatible types in "await" (actual type "List[PeekedMessageItem]", expected type "Awaitable[Any]") [misc]
  • _queue_client_async.py:775: error: Incompatible types in "await" (actual type "None", expected type "Awaitable[Any]") [misc]
  • _queue_client_async.py:832: error: Incompatible types in "await" (actual type "None", expected type "Awaitable[Any]") [misc]

@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Apr 11, 2023
@vincenttran-msft vincenttran-msft changed the base branch from main to feature/storage-queue-typing April 11, 2023 09:00
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-storage-queue

@vincenttran-msft
Copy link
Member Author

/azp run python - storage - ci

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@vincenttran-msft vincenttran-msft merged commit 03b65c0 into Azure:feature/storage-queue-typing May 3, 2023
@vincenttran-msft vincenttran-msft deleted the vincenttran/mypy_queue_2 branch May 3, 2023 23:51
vincenttran-msft added a commit that referenced this pull request Nov 10, 2023
* [Storage] Update typing for `queue_service_client` (Queue) (#28949)

* qsc done sync&async

* Remove #type ignore, fix dict()

* Fix indents

* Fix indent again :D

* [Storage] Update typing for `queue_client` (Queue) (#28952)

* sync 80% done need *, logic

* First attempt at *,

* Async + unify sync spacing

* Fix CI

* Revert recordings

* PR feedback

* Revert recording, fix indents

* indent, again :D

* Fix content docstring

* [Storage] Update typing for miscellaneous files (queue) (#29173)

* [Storage] `_queue_client.py` mypy fixes (#29736)

* First draft MyPy

* Mypy config fix + just Config Mypy left

* Fully done w/ custom StorageConfiguration

* Pylint

* Double import

* Fix cast

* PR feedback

* Unused imports

* Pylint

* Configuration errors in async BE GONE

* Fix tests that assert against _config

* [Storage] _queue_client_async.py mypy fixes  (#29824)

* Init done for _queue_client

* Fix async calling into sync

* Back to the drawing board

* Finished __init__

* Fix failing tests

* queue_client done and decoupled

* Queue specific files done

* Shared, some base_client leftovers, some model leftovers

* 3 _model 1 response_handlers

* Mypy congrats, time to fight pylint & CI :D

* unused import asyncio

* New PyLint rules fixes

* Pylint 2

* Fix failing test cases

* Be gone test failures

* Finally found root cause of infinite loop

* All encryption tests passing locally, 32 pylint errors remaining

* All tests passing locally, mypy green locally

* Pylint

* Encryption feedback done

* Shared, sample, and lint output left

* More comments addressed, need bc_async, policies, and samples + output

* Just samples, added more helpers

* More feedback

* More fixes

* Lint

* Feedback 2

* CI

* Fix weird invisible unicode char

* No mypy errors hopefully no CI

* Pylint and CI, but now hinting issues

* Fix Lint which should fix CI

* Attempted overload

* Just hanging encryption and message_encoding Qs, fix import ordering

* Addressed encryption feedback

* Feedback, need base client decouple, need CI passing

* Fixing CI

* CI

* CI

* Ignores :(

* More fixes

* CI

* Pylint again

* Adjust typehint

* Try SO workaround 41207128

* Reimport Pylint

* First round of feedback

* Fix CorsRule to_generated method

* Fix PyLint & test failures

* Feedback

* Revert moving out sas token helper, causes circular dependency

* Pylint

* Typing feedback

* Fix CI

* Use QueueMessage ctor

* Pylint

* Privatize CorsRule method

* Disable for protected access

* Flip on mypy

* Missed configuration value parsing

* Double-spaced

* Typo

* Last minute nits

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

Labels

Storage Storage Service (Queues, Blobs, Files)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants