Skip to content

fix(temp_window): Remove non-functional *args parameter#619

Open
tony wants to merge 1 commit into
masterfrom
fix-temp-window-args
Open

fix(temp_window): Remove non-functional *args parameter#619
tony wants to merge 1 commit into
masterfrom
fix-temp-window-args

Conversation

@tony
Copy link
Copy Markdown
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

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 47.02%. Comparing base (3a6fb89) to head (bd382df).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #619   +/-   ##
=======================================
  Coverage   47.02%   47.02%           
=======================================
  Files          23       23           
  Lines        3296     3296           
  Branches      709      709           
=======================================
  Hits         1550     1550           
  Misses       1384     1384           
  Partials      362      362           

☔ 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
Copy Markdown
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 👎.

@tony tony force-pushed the fix-temp-window-args branch from dff674e to 8cb8b4d Compare April 26, 2026 10:06
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
@tony tony force-pushed the fix-temp-window-args branch from 8cb8b4d to bd382df Compare May 10, 2026 15:48
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