Skip to content

Ignore mypy errors#5798

Merged
chlowell merged 1 commit intoAzure:masterfrom
chlowell:ignore-errors
Jun 11, 2019
Merged

Ignore mypy errors#5798
chlowell merged 1 commit intoAzure:masterfrom
chlowell:ignore-errors

Conversation

@chlowell
Copy link
Member

Ignoring a few mypy errors in authentication and authentication_async:

  • self._update_headers(request.http_request.headers, token) raises an error because the type variable HTTPRequestType doesn't have a headers attribute. Tracked by HTTPRequestType has no attribute "headers" #5796.
  • await self._credential.get_token(*self._scopes) raises an error because the credential's Protocol defines get_token as returning a string. At runtime however, self._credential will be an async credential and get_token will return a coroutine.
  • await self.next.send(request) raises an error because self.next is typed Optional[Any]. Looks like this should be something else, e.g. Optional[AsyncHTTPPolicy]. Tracked by AsyncHTTPPolicy's next attribute is Optional[Any] #5797.

@adxsdk6
Copy link

adxsdk6 commented Jun 11, 2019

Can one of the admins verify this patch?

@chlowell
Copy link
Member Author

/azp run azure-sdk-for-python - client

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@chlowell chlowell merged commit 89a8cc9 into Azure:master Jun 11, 2019
@chlowell chlowell deleted the ignore-errors branch June 11, 2019 18:19
rajivnandivada pushed a commit to rajivnandivada/azure-sdk-for-python that referenced this pull request Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants