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 missing arguments to run_process #3212

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

Conversation

A5rocks
Copy link
Contributor

@A5rocks A5rocks commented Feb 16, 2025

Fixes #3183

I tried out TypedDict here like @decorator-factory recommended and it's nicer, though it's explicitly trading off user experience:

  • no defaults listed
  • wacky reveal_type at least under mypy

I think it's worth it? I doubt people are looking at overloads for the defaults to things.

I still need to add type tests.

Copy link

codecov bot commented Feb 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00000%. Comparing base (d63f3a9) to head (d82d545).
Report is 3 commits behind head on main.

Additional details and impacted files
@@               Coverage Diff               @@
##                 main        #3212   +/-   ##
===============================================
  Coverage   100.00000%   100.00000%           
===============================================
  Files             124          124           
  Lines           18764        18771    +7     
  Branches         1269         1269           
===============================================
+ Hits            18764        18771    +7     
Files with missing lines Coverage Δ
src/trio/_subprocess.py 100.00000% <100.00000%> (ø)

@A5rocks A5rocks changed the title Update run process Add missing arguments to run_process Feb 16, 2025
Copy link
Member

@jakkdl jakkdl left a comment

Choose a reason for hiding this comment

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

I haven't looked terribly close at the arguments, but seems fine at a glance.
In an ideal world it'd maybe be nice to have tests.. but it sounds messy to write something that validates against typeshed signatures and handles version/platform differences.

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.

Add executable kwarg to trio.run_process type hints
2 participants