Skip to content

Conversation

@tony
Copy link
Member

@tony tony commented Jan 3, 2026

Summary

  • Remove *args from temp_window() signature since it cannot be forwarded to Session.new_window()

Problem

Session.new_window() uses keyword-only arguments (has a * marker after window_name), which means it cannot accept positional arguments beyond window_name. However, temp_window() accepted *args and attempted to forward them, which would cause a TypeError at runtime if anyone tried to pass positional arguments.

Example that would fail before this fix:

with temp_window(session, "positional_arg") as window:
    # TypeError: new_window() takes 2 positional arguments but 3 were given

Note: temp_session() is unaffected because Server.new_session() explicitly accepts *args.

Test plan

  • All 872 tests pass
  • mypy passes

why: Session.new_window() uses keyword-only arguments (has * marker after
window_name), so temp_window() could not forward *args. Calling
temp_window(session, "positional_arg") would raise TypeError.
what:
- Remove *args from temp_window() signature
- Update docstring to remove args parameter documentation
- Remove *args forwarding in session.new_window() call
@codecov
Copy link

codecov bot commented Jan 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 45.39%. Comparing base (849cbca) to head (dff674e).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #619   +/-   ##
=======================================
  Coverage   45.39%   45.39%           
=======================================
  Files          22       22           
  Lines        2249     2249           
  Branches      360      360           
=======================================
  Hits         1021     1021           
  Misses       1082     1082           
  Partials      146      146           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tony
Copy link
Member Author

tony commented Jan 3, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

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