Skip to content

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

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

fix(temp_window): Remove non-functional *args parameter#619
tony wants to merge 1 commit intomasterfrom
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 46.58%. Comparing base (81d55fa) to head (8cb8b4d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #619   +/-   ##
=======================================
  Coverage   46.58%   46.58%           
=======================================
  Files          22       22           
  Lines        2372     2372           
  Branches      390      390           
=======================================
  Hits         1105     1105           
  Misses       1098     1098           
  Partials      169      169           

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

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 dff674e to 8cb8b4d Compare April 26, 2026 10:06
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