-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
Type checking calls[] is insufficient #610
Comments
Thanks for reporting an issue Can you please attach a minimal reproducible code snippet? Similar to stackoverflow |
Got it. I believe the below is both complete and minimal: import requests
import responses
def get_something():
return requests.get('http://example.com')
def test_get_something():
with responses.RequestsMock() as rsps:
rsps.add(responses.GET, 'http://example.com', body='foo')
foo = get_something()
assert rsps.calls[0].request.url == 'http://example.com/' Updated original report. The mypy equivalent of the above Pyright error is:
|
This was fixed in master? any chance we could get a release? :) 26bb973 |
Yes, we will do it soon Need to add a couple of things |
Any ETA on a new release? Thanks for the great tool. |
@evilensky please track #629 ticket for the release info Build must pass internal review before publishing, usually a couple of weeks |
Describe the bug
this bit of code
results in a type checking failure in mypy and pyright. The Pyright message is:
Additional context
No response
Version of
responses
0.22.0
Steps to Reproduce
Example in bug description.
Expected Result
The example code should pass type checking. Members of List[Call] should have their attributes properly annotated.
Actual Result
Cannot access member "request" for type "List[Call]" Member "request" is unknown
The text was updated successfully, but these errors were encountered: