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

fix(typing): TestClient methods return Result, not _ResultBase #2211

Closed
wants to merge 7 commits into from

Conversation

CaselIT
Copy link
Member

@CaselIT CaselIT commented Feb 1, 2024

Follow up of #2209 cc @davetapley

Fixes #2207

@CaselIT CaselIT marked this pull request as draft February 2, 2024 17:39
@CaselIT
Copy link
Member Author

CaselIT commented Feb 2, 2024

Moved to draft for now, I'll look at the failure next week.

@vytas7 I don't remember if we settled on installing typing_extensions on v4 to better support typing

Copy link

codecov bot commented Feb 17, 2024

Codecov Report

Attention: Patch coverage is 96.26168% with 4 lines in your changes missing coverage. Please review.

Project coverage is 99.94%. Comparing base (4910dd7) to head (9cecfe8).
Report is 73 commits behind head on master.

Files with missing lines Patch % Lines
falcon/testing/client.py 96.19% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##            master    #2211      +/-   ##
===========================================
- Coverage   100.00%   99.94%   -0.06%     
===========================================
  Files           62       62              
  Lines         6880     6919      +39     
  Branches      1099     1099              
===========================================
+ Hits          6880     6915      +35     
- Misses           0        4       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vytas7
Copy link
Member

vytas7 commented Feb 17, 2024

No, I'd love to keep the "production" installation of Falcon free of any dependencies. Is it possible to instruct the type checker to install these extensions?

Also, it is probably OK to add these dependencies on older Python versions. We don't even ship Linux wheels for some of them.

@CaselIT
Copy link
Member Author

CaselIT commented Feb 17, 2024

Is it possible to instruct the type checker to install these extensions?

I don't think so.

I'll try doing something more sophisticated wrt import

@vytas7 vytas7 changed the title TestClient methods return Result, not _ResultBase fix(typing): TestClient methods return Result, not _ResultBase Aug 23, 2024
@vytas7
Copy link
Member

vytas7 commented Aug 30, 2024

@CaselIT has this PR been superseded by others in the typing work stream, or should we still consider this one separately?

@CaselIT
Copy link
Member Author

CaselIT commented Aug 30, 2024

No, it's still relevant. I plan on finishing it once the other ones are merged

@CaselIT
Copy link
Member Author

CaselIT commented Sep 23, 2024

replaced by #2338

@CaselIT CaselIT closed this Sep 23, 2024
@CaselIT CaselIT deleted the testclient-return-types branch September 25, 2024 10:13
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.

TestClient methods are typed to return _ResultBase, but actually return Result
3 participants