8000 Dataclasses by tony · Pull Request #426 · tmux-python/libtmux · GitHub
[go: up one dir, main page]

Skip to content

Dataclasses#426

Merged
tony merged 9 commits intomasterfrom
dataclass-basic
Dec 27, 2022
Merged

Dataclasses#426
tony merged 9 commits intomasterfrom
dataclass-basic

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 mentioned this pull request Dec 18, 2022
@tony tony force-pushed the dataclass-basic branch 6 times, most recently from 7a37ddd to f865a3d Compare December 18, 2022 14:25
@tony tony force-pushed the dataclass-basic branch 6 times, most recently from d4933aa to fdc6776 Compare December 24, 2022 00:42
@tony tony force-pushed the dataclass-basic branch 7 times, most recently from f0473d2 to 5c75e79 Compare December 26, 2022 22:14
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.

1 participant

0