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 typing for _wait_for_object.py #2755

Merged
merged 20 commits into from
Aug 21, 2023

Conversation

CoolCat467
Copy link
Member

This PR adds type annotations to _wait_for_object.py and _core/_windows_cffi.py

I would love feedback and any comments on how this could be improved to be more accurate.

@codecov
Copy link

codecov bot commented Aug 14, 2023

Codecov Report

Merging #2755 (dc0b608) into master (9028678) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2755   +/-   ##
=======================================
  Coverage   98.94%   98.94%           
=======================================
  Files         113      113           
  Lines       16794    16837   +43     
  Branches     3030     3036    +6     
=======================================
+ Hits        16616    16659   +43     
  Misses        123      123           
  Partials       55       55           
Files Changed Coverage Δ
trio/_core/_tests/test_windows.py 100.00% <100.00%> (ø)
trio/_core/_windows_cffi.py 100.00% <100.00%> (ø)
trio/_wait_for_object.py 100.00% <100.00%> (ø)

@TeamSpen210
Copy link
Contributor

I think you might need to access it via cffi.FFI.CData, on the class.

@CoolCat467
Copy link
Member Author

If anyone has any ideas, the only issue the CI has is the mypy run for windows, saying

trio/_core/_windows_cffi.py:225: error: Name "ffi.CData" is not defined  [name-defined]

@A5rocks A5rocks added the typing Adding static types to trio's interface label Aug 16, 2023
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.

pyproject.toml

pyproject.toml Show resolved Hide resolved
@CoolCat467 CoolCat467 requested a review from jakkdl August 20, 2023 02:13
@jakkdl jakkdl enabled auto-merge (squash) August 21, 2023 10:47
@jakkdl jakkdl merged commit 3bdab93 into python-trio:master Aug 21, 2023
27 checks passed
@CoolCat467 CoolCat467 deleted the typing-wait-for-object branch August 22, 2023 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
typing Adding static types to trio's interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants