Skip to content

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

@github-actions

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 lleft 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 ltimers (a list of timer observables)
  • test_timeinterval.py — collection litems

E721 — Type comparison (1 occurrence)

test_fromfuture.py: type(err) == asyncio.CancelledErrorisinstance(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 isx is not
  • UP045 (4): Optional[X]X | None
  • UP006 (3): List[X]list[X]
  • E711 (1): != Noneis 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
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions