Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.12"

Expand Down
8 changes: 8 additions & 0 deletions changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changes

## Unreleased

- Testing: Fixed ruff lint issues in `tests/test_scheduler/` (import ordering,
f-string upgrades, `object` base class removal) and removed it from the
ruff exclude list. `tests/test_subject/` also removed from the ruff exclude
list as it already passed all checks.
- CI: Standardised `actions/setup-python` to `@v5` across all workflow jobs.

## 2.0.0-alpha

- Extension methods and extension class methods have been removed. This
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ exclude = [
"examples",
# Test directories - remove as each stage is completed
# Stage 1 complete, Stage 2 partial (test_integration complete)
"tests/test_subject",
"tests/test_scheduler",
# test_subject and test_scheduler now pass ruff checks
"tests/test_observable",
]

Expand Down Expand Up @@ -111,6 +110,8 @@ asyncio_mode = "strict"
include = ["reactivex", "tests"]
exclude = [
# Stage 1 complete, Stage 2 partial (test_integration complete)
# test_subject and test_scheduler now pass ruff and pyright (run separately)
# keeping them excluded until strict-mode pyright issues are resolved
"tests/test_subject",
"tests/test_scheduler",
"tests/test_observable",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import asyncio
import os
from typing import Any
import unittest
from datetime import datetime, timedelta, timezone
from typing import Any

import pytest

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from reactivex.scheduler.eventloop import IOLoopScheduler

tornado = pytest.importorskip("tornado")
from tornado import ioloop # isort: skip
from tornado import ioloop # noqa: E402


class TestIOLoopScheduler(unittest.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_scheduler/test_eventloop/test_twistedscheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from reactivex.scheduler.eventloop import TwistedScheduler

twisted = pytest.importorskip("twisted")
from twisted.internet import defer, reactor # isort: skip
from twisted.trial import unittest # isort: skip
from twisted.internet import defer, reactor # noqa: E402
from twisted.trial import unittest # noqa: E402


class TestTwistedScheduler(unittest.TestCase):
Expand Down
6 changes: 3 additions & 3 deletions tests/test_scheduler/test_historicalscheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

def assert_equals(first, second):
if len(first) != len(second):
print("len(%d) != len(%d)" % (len(first), len(second)))
print(f"len({len(first)}) != len({len(second)})")
assert False

for i in range(len(first)):
Expand All @@ -31,7 +31,7 @@ def from_days(days):
return timedelta(days=days)


class Timestamped(object):
class Timestamped:
def __init__(self, value, timestamp):
self.value = value
self.timestamp = timestamp
Expand All @@ -43,7 +43,7 @@ def assert_equals(self, other):
return other.value == self.value and other.timestamp == self.timestamp

def __str__(self):
return "(%s, %s)" % (self.value, self.timestamp)
return f"({self.value}, {self.timestamp})"

def __repr__(self):
return str(self)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_scheduler/test_mainloop/test_gtkscheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from reactivex.scheduler.mainloop import GtkScheduler

gi = pytest.importorskip("gi")
from gi.repository import GLib, Gtk # isort: skip
from gi.repository import GLib, Gtk # noqa: E402, I001


gi.require_version("Gtk", "3.0")
Expand Down
Loading