Skip to content

fix(options): type wait_for_quiescence setter as bool - #1344

Merged
KazuCocoa merged 1 commit into
appium:masterfrom
MattL1989:fix/wait-for-quiescence-type-hint
Oct 31, 2026
Merged

KazuCocoa merged 1 commit into
appium:masterfrom
MattL1989:fix/wait-for-quiescence-type-hint

Conversation

@MattL1989

Copy link
Copy Markdown
Contributor

Problem

waitForQuiescence is a boolean XCUITest capability, and XCUITestOptions.wait_for_quiescence is annotated to return bool | None. Its setter, however, was annotated as value: timedelta | float, which looks copied from the neighbouring timeout options such as wait_for_idle_timeout.

As a result, type checkers accepted options.wait_for_quiescence = timedelta(seconds=1). That value is stored unchanged and cannot be serialized when the session is created.

Fix

Annotate the setter as value: bool, consistent with the getter and with the other boolean options such as auto_accept_alerts. Remove the timedelta import, which is now unused. There is no runtime change.

Tests

  • With the fix, mypy rejects options.wait_for_quiescence = timedelta(seconds=1) and still accepts options.wait_for_quiescence = False.
  • ruff check, ruff format --check, mypy appium and the full unit test suite pass.

🤖 Generated with Claude Code

waitForQuiescence is a boolean XCUITest capability and the getter returns
bool, but the setter was annotated as accepting timedelta | float, copied
from the timeout options. Type checkers therefore accepted a timedelta,
which cannot be serialized when the session is created.

Annotate the setter as bool and drop the unused timedelta import.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01K6zVKi1DtwmmBpy16MQyfY

@KazuCocoa KazuCocoa left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

waitForQuiescence no longer exists, thus we'll clean up these later

@KazuCocoa
KazuCocoa merged commit 20b529e into appium:master Oct 31, 2026
12 of 13 checks passed
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