Skip to content

Adding type hints to class methods returning self and child #361

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

Merged
merged 6 commits into from
Mar 18, 2022

Conversation

otherJL0
Copy link
Contributor

  • Adding SessionDict, WindowDict, and PaneDict type aliases to common.py for _list methods
  • Adding hints for methods returning self and collections of children

@codecov
Copy link

codecov bot commented Mar 18, 2022

Codecov Report

Merging #361 (fcfeb39) into master (c30da96) will increase coverage by 0.09%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #361      +/-   ##
==========================================
+ Coverage   87.90%   87.99%   +0.09%     
==========================================
  Files          15       15              
  Lines        1496     1499       +3     
==========================================
+ Hits         1315     1319       +4     
+ Misses        181      180       -1     
Impacted Files Coverage Δ
libtmux/common.py 87.12% <100.00%> (+0.19%) ⬆️
libtmux/pane.py 82.35% <100.00%> (ø)
libtmux/server.py 79.31% <100.00%> (+0.11%) ⬆️
libtmux/session.py 81.43% <100.00%> (ø)
libtmux/window.py 84.84% <100.00%> (+0.51%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c30da96...fcfeb39. Read the comment docs.

@otherJL0
Copy link
Contributor Author

@tony I appreciate the invitation! I don't know if I'll have availability to collaborate simultaneous on Saturday but I'm happy to help gradually add type hints when I can.

@tony
Copy link
Member

tony commented Mar 18, 2022

@otherJL0 Absolutely, open up a PR / issue / discussion whenever you have free time. We are below < 1.0 so there is flexibility to make changes.

You will #359 commit in 0.11

@tony tony self-requested a review March 18, 2022 22:31
Copy link
Member

@tony tony left a comment

Choose a reason for hiding this comment

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

LGTM

@tony tony merged commit 45889dc into tmux-python:master Mar 18, 2022
tony added a commit that referenced this pull request Mar 18, 2022
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.

2 participants