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

@tony tony commented Jan 3, 2026

Copy link
Copy Markdown
Member

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

codecov Bot commented Jan 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 51.29%. Comparing base (5a34cc5) to head (463d7c9).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #619   +/-   ##
=======================================
  Coverage   51.29%   51.29%           
=======================================
  Files          25       25           
  Lines        3488     3488           
  Branches      686      686           
=======================================
  Hits         1789     1789           
  Misses       1404     1404           
  Partials      295      295           

☔ 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

tony commented Jan 3, 2026

Copy link
Copy Markdown
Member Author

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
@tony tony force-pushed the fix-temp-window-args branch from 8cb8b4d to bd382df Compare May 10, 2026 15:48
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 bd382df to 463d7c9 Compare May 30, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant