Skip to content

Dataclasses #426

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 9 commits into from
Dec 27, 2022
Merged

Dataclasses #426

merged 9 commits into from
Dec 27, 2022

Conversation

tony
Copy link
Member

@tony tony commented Sep 17, 2022

Notes

vim:

Replace .get("session_id") with .session_id:

%s/\.get(\"\(.*\)\")/.\1/ge

Replace pane["pane_id"] with pane.pane_id:

%s/\[\"\(.*\)\"\]/.\1/ge

Todo:

  • window.width -> window.window_width
  • window.height -> window.window_height
  • {session,window,pane}.id -> {session,window,pane}.{session,window,pane}_id
  • {session,window,pane}.index -> {session,window,pane}.{session,window,pane}_index
  • {session,window}.name -> {session,window}.{session,window}_name
  • @refresh_before_return(), @refresh_before_return(default=True) method decorator
  • Investigate __eq__: Do we want to have fields use field(eq=False) by default?

API changes:

  • Server._list_sessions
  • Server._list_panes

@codecov
Copy link

codecov bot commented Sep 17, 2022

Codecov Report

Merging #426 (7716527) into master (715317d) will increase coverage by 1.70%.
The diff coverage is 90.12%.

❗ Current head 7716527 differs from pull request most recent head 373973b. Consider uploading reports for the commit 373973b to get more accurate results

@@            Coverage Diff             @@
##           master     #426      +/-   ##
==========================================
+ Coverage   87.48%   89.18%   +1.70%     
==========================================
  Files          23       35      +12     
  Lines        2102     3404    +1302     
  Branches      349      474     +125     
==========================================
+ Hits         1839     3036    +1197     
- Misses        178      262      +84     
- Partials       85      106      +21     
Impacted Files Coverage Δ
src/libtmux/common.py 83.33% <ø> (-0.71%) ⬇️
src/libtmux/formats.py 100.00% <ø> (ø)
tests/test_pytest_plugin.py 100.00% <ø> (ø)
src/libtmux/_internal/query_list.py 45.91% <45.91%> (ø)
src/libtmux/test.py 76.59% <66.66%> (ø)
src/libtmux/server.py 70.09% <79.41%> (-2.63%) ⬇️
src/libtmux/session.py 77.66% <79.72%> (+0.57%) ⬆️
src/libtmux/window.py 79.62% <79.85%> (+0.88%) ⬆️
src/libtmux/pane.py 91.08% <94.59%> (+8.37%) ⬆️
tests/legacy_api/test_session.py 97.05% <97.05%> (ø)
... and 19 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@tony tony force-pushed the dataclass-basic branch 8 times, most recently from dbd66ed to cfc0489 Compare September 17, 2022 21:19
@tony tony force-pushed the dataclass-basic branch 15 times, most recently from 8ef7d69 to 3f38bc2 Compare September 18, 2022 14:50
@tony tony force-pushed the dataclass-basic branch 4 times, most recently from 88954e8 to ec65979 Compare September 19, 2022 00:57
@tony tony force-pushed the dataclass-basic branch 10 times, most recently from 74d3f78 to 178fde7 Compare December 26, 2022 22:46
@tony tony changed the title Dataclasses (basic) Dataclasses Dec 26, 2022
@tony tony force-pushed the dataclass-basic branch 4 times, most recently from 2151777 to 28b2ddc Compare December 27, 2022 00:11
@tony tony merged commit d815ed9 into master Dec 27, 2022
@tony tony deleted the dataclass-basic branch December 27, 2022 02:21
tony added a commit that referenced this pull request Dec 27, 2022
tony added a commit to tmux-python/tmuxp that referenced this pull request Dec 27, 2022
This includes libtmux 0.17's API overhaul from 
tmux-python/libtmux#426
franciscozdo pushed a commit to franciscozdo/mimiker that referenced this pull request Apr 29, 2023
According to tmux-python/libtmux#426 retrival of
pane ID has changed. Added function to check version of libtmux and
choose proper way of getting pane_id.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant