tmux-python / tmux-python/libtmux

Dataclass: API updates

Open
#419 0 comments 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

server = Server.new()
server = Server.connect()

@dataclasses.dataclass
class Server:
    @classmethod
    def new():
       pass

    @classmethod
    def connect(socket='')
       pass

   session = '' # Find a way to have session be Session with `server` automatically added
   # https://docs.python.org/3/library/functools.html#functools.partialmethod 
   # session.create
   # session.find
   # session.find_or_create
Session.create(server=server)

# let user see supported formatters
SUPPORTED_FORMATTERS = []
Window.create(session_id='')
Window.find(target='')
Window.find_or_create(name='', defaults={})

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

Start by locating the current Server, Session, and Window implementations and their tests, if present; the issue names no files or entry points. Compare the existing API with the proposed dataclass methods and formatter exposure, then clarify the design before considering the work done.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.