Skip to content
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

Add more typing details #1204

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Dreamsorcerer
Copy link
Contributor

@Dreamsorcerer Dreamsorcerer commented Mar 24, 2021

Just adding in a couple more annotations.

FYI, it's rather verbose using typing.*, common practice is to use from typing import ....

Fixes #1203.

@Dreamsorcerer Dreamsorcerer marked this pull request as ready for review March 24, 2021 15:21
@@ -4,7 +4,7 @@
from urllib.parse import urlparse

import requests
from requests import Response
from requests import Response as Response
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This allows using the Response type without directly depending on requests (which avoids any issues if the underlying library were ever changed).

Used like:

from zeep.transports import Response
resp: Response = client_with_raw_response.service.Foo()

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.

zeep.* attributes not available in mypy
1 participant