diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index 3faa3729d..c5bf3446c 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -131,7 +131,6 @@ jobs: - "macos-14" # arm64 - "windows-2022" python_version: - - '3.9' - '3.10' - '3.11' - '3.12' diff --git a/devtools/update_pyproject.py b/devtools/update_pyproject.py index d09b990bf..ffa5886de 100644 --- a/devtools/update_pyproject.py +++ b/devtools/update_pyproject.py @@ -40,7 +40,7 @@ def __init__(self, ctx: Context) -> None: # and retain all the comments self.subprojects: typing.Dict[str, ProjectInfo] = {} for name, project in self.ctx.subprojects.items(): - with open(project.pyproject_path, "r") as fp: + with open(project.pyproject_path) as fp: data = tomlkit.load(fp) self.subprojects[name] = ProjectInfo( diff --git a/subprojects/pyntcore/tests/test_api.py b/subprojects/pyntcore/tests/test_api.py index 4f1bd5bfe..88fc7ed9d 100644 --- a/subprojects/pyntcore/tests/test_api.py +++ b/subprojects/pyntcore/tests/test_api.py @@ -4,8 +4,6 @@ # works correctly # -from __future__ import print_function - import pytest import logging diff --git a/subprojects/pyntcore/tests/test_util.py b/subprojects/pyntcore/tests/test_util.py index 9f5d08034..fc0d35ec6 100644 --- a/subprojects/pyntcore/tests/test_util.py +++ b/subprojects/pyntcore/tests/test_util.py @@ -27,7 +27,7 @@ def test_ntproperty(nt: NetworkTableInstance): - class Foo(object): + class Foo: robotTime = ntproperty( "/SmartDashboard/robotTime", 0.0, writeDefault=False, inst=nt ) @@ -85,14 +85,14 @@ class Foo(object): def test_ntproperty_emptyarray(nt: NetworkTableInstance): with pytest.raises(TypeError): - class Foo1(object): + class Foo1: testArray = ntproperty( "/SmartDashboard/testArray", [], writeDefault=True, inst=nt ) with pytest.raises(TypeError): - class Foo2(object): + class Foo2: testArray = ntproperty( "/SmartDashboard/testArray", [], writeDefault=False, inst=nt ) @@ -106,7 +106,7 @@ def test_ntproperty_multitest(nt: NetworkTableInstance): pyfrc tests """ - class Foo(object): + class Foo: robotTime = ntproperty( "/SmartDashboard/robotTime", 0.0, writeDefault=False, inst=nt ) diff --git a/subprojects/robotpy-cscore/cscore/imagewriter.py b/subprojects/robotpy-cscore/cscore/imagewriter.py index 89a5a071a..7799b1b38 100644 --- a/subprojects/robotpy-cscore/cscore/imagewriter.py +++ b/subprojects/robotpy-cscore/cscore/imagewriter.py @@ -104,7 +104,7 @@ def location(self): if self._location is None: # This assures that we only log when a USB memory stick is plugged in if not os.path.exists(self.location_root): - raise IOError( + raise OSError( "Logging disabled, %s does not exist" % self.location_root ) @@ -139,7 +139,7 @@ def _run(self): last = now - except IOError as e: + except OSError as e: logger.error("Error logging images: %s", e) logger.warn("Storage thread exited") diff --git a/subprojects/robotpy-wpiutil/examples/printlog.py b/subprojects/robotpy-wpiutil/examples/printlog.py index 4db4c33d5..da03ef8ce 100755 --- a/subprojects/robotpy-wpiutil/examples/printlog.py +++ b/subprojects/robotpy-wpiutil/examples/printlog.py @@ -60,7 +60,7 @@ # handle systemTime specially if entry.name == "systemTime" and entry.type == "int64": dt = datetime.fromtimestamp(record.getInteger() / 1000000) - print(" {:%Y-%m-%d %H:%M:%S.%f}".format(dt)) + print(f" {dt:%Y-%m-%d %H:%M:%S.%f}") continue if entry.type == "double":