Skip to content

[Repo Assist] test: fix all ruff lint errors in tests/test_observable/; remove from ruff exclude listΒ #764

Description

@github-actions

πŸ€– This PR was created by Repo Assist, an automated AI assistant.

Summary

This PR fixes all 152 ruff lint errors in tests/test_observable/ and removes the directory from the ruff exclude list in pyproject.toml.

Changes

tests/test_observable/ β€” ruff lint fixes

E741 β€” Ambiguous variable name l (13 occurrences)

Renamed l β†’ left or items in:

  • test_amb.py, test_skipuntil.py, test_takeuntil.py β€” observable named left (matching the left_msgs variable already in scope)
  • test_groupjoin.py β€” function parameter l β†’ timers (a list of timer observables)
  • test_timeinterval.py β€” collection l β†’ items

E721 β€” Type comparison (1 occurrence)

test_fromfuture.py: type(err) == asyncio.CancelledError β†’ isinstance(err, asyncio.CancelledError)

E501 β€” Line too long (36 occurrences)

Most long lines were in commented-out code that was never converted from JavaScript (old RxJS test stubs). These dead comment blocks were removed from:

  • test_doaction.py β€” ~270 lines of unconverted JavaScript test stubs
  • test_replay.py β€” 3 commented-out test methods with very long assert lines
  • test_takelastbuffer.py β€” 2 commented-out test functions
  • test_startwith.py β€” 1 commented-out test with syntax error

Module docstrings in test_mathematical_fluent.py, test_multicasting_fluent.py, test_method_chaining.py, and test_filtering_fluent.py were wrapped to fit 88 chars.

Active code in test_starmap.py was reformatted with line continuations.

Auto-fixed (63 β†’ 89 via --fix and --unsafe-fixes)

  • I001 (13): import sorting
  • UP032 (28): f-string upgrades
  • UP004 (6): useless object base class
  • E714 (5): not x is β†’ x is not
  • UP045 (4): Optional[X] β†’ X | None
  • UP006 (3): List[X] β†’ list[X]
  • E711 (1): != None β†’ is not None
  • F401 (1): unused import
  • UP031 (16): %-format β†’ f-string (unsafe-fix)
  • F841 (7): unused local variable removals
  • UP008 (2): super(Class, self) β†’ super()
  • E731 (12): lambda assignment β†’ def
  • UP035 (4): deprecated typing imports

pyproject.toml

Removed tests/test_observable from [tool.ruff] exclude list. Updated comment to reflect stage completion.

changes.md

Added changelog entry for this PR. Also resolved pre-existing merge conflict markers (both concurrent entries are preserved).

Verification

  • uv run ruff check tests/ β†’ All checks passed (0 errors)
  • uv run pytest tests/test_observable/ β†’ 1270 passed

What's next

  • tests/test_observable/ and tests/test_subject/ still in pyright exclude list β€” fixing those requires type annotations on callback parameters (larger effort, separate PRs)

Warning

Protected Files

This was originally intended as a pull request, but the patch modifies protected files. These files may affect project dependencies, CI/CD pipelines, or agent behaviour. Please review the changes carefully before creating the pull request.

Click here to create the pull request once you have reviewed the changes

Protected files
  • pyproject.toml

To route changes like this to a review issue instead of blocking, configure protected-files: fallback-to-issue in your workflow configuration.

Note

πŸ”’ Integrity filter blocked 72 items

The following items were blocked because they don't meet the GitHub integrity level.

  • #749 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #748 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #742 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #736 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #711 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #700 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #698 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • #634 list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • Missing tap operatorΒ #750 list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • Python 3.14 SupportΒ #737 list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • AsyncIOScheduler.now returns a datetime in 1970.Β #734 list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • Offering help with Unit TestsΒ #730 list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • Schedulers using different now() implementation breaks schedule_absolute() compatibility.Β #724 list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • Lack of concat_map / concat_allΒ #723 list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • Concurrent Execution Not Working as Expected with RxPY ThreadPoolSchedulerΒ #713 list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • switch_map() operator not listed in documentationΒ #710 list_issues: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
  • ... and 56 more items

To allow these resources, lower min-integrity in your GitHub frontmatter:

tools:
  github:
    min-integrity: approved  # merged | approved | unapproved | none

Generated by Repo Assist Β· ● 8.1M Β· β—·

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions