tmux-python / tmux-python/libtmux

Dataclasses: Add field that maps attribute <-> formatter

Open
#462 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.2k
Forks
127
Avg merge
2h 13m
Merged PRs (30d)
1

Description

e.g.

@dataclasses.dataclass
class Pane:
    width = TmuxFormatField(format_variable='pane_width')
Pane._meta.format_map = {
    'width': 'pane_width'
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by locating the dataclass definitions and the code that builds or consumes _meta.format_map; compare the requested TmuxFormatField example with the explicit mapping example. Done means an attribute such as width can map to pane_width through the declared field and produces the expected formatter behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.