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

Make pyright recognize open_memory_channel as generic #2874

Merged
merged 3 commits into from
Nov 8, 2023

Conversation

A5rocks
Copy link
Contributor

@A5rocks A5rocks commented Nov 8, 2023

Fixes #2873

Minimal changes required. It's also possible to reorganize code but meh.

Not sure if there's a way to scan trio for other occurances of this... other than running pyright over it and fixing everything which I absolutely do not want to do. 2 type checkers is 1 too many!

@A5rocks
Copy link
Contributor Author

A5rocks commented Nov 8, 2023

pre-commit.ci autofix

Copy link

codecov bot commented Nov 8, 2023

Codecov Report

Merging #2874 (dfa5576) into master (0d53c29) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2874   +/-   ##
=======================================
  Coverage   99.18%   99.18%           
=======================================
  Files         115      115           
  Lines       17611    17611           
  Branches     3149     3149           
=======================================
  Hits        17468    17468           
  Misses         99       99           
  Partials       44       44           
Files Coverage Δ
trio/_channel.py 100.00% <ø> (ø)

Copy link
Member

@Zac-HD Zac-HD left a comment

Choose a reason for hiding this comment

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

I've confirmed locally that this fixes the issue! Thanks for the incredibly fast fix @A5rocks 🤩

@Zac-HD Zac-HD merged commit ced22d1 into python-trio:master Nov 8, 2023
@Zac-HD
Copy link
Member

Zac-HD commented Nov 8, 2023

Let's hold 0.23.2 until #2734 is finished, to make sure we haven't missed any similar issues.

@A5rocks A5rocks deleted the fix-pyright-open-memory-channel branch November 8, 2023 06:58
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.

pyright does not understand trio.open_memory_channel[int](0)
2 participants