diff --git a/.github/workflows/comment-command.yml b/.github/workflows/comment-command.yml index 20738ef2b2..4e73337487 100644 --- a/.github/workflows/comment-command.yml +++ b/.github/workflows/comment-command.yml @@ -43,7 +43,7 @@ jobs: distribution: 'temurin' java-version: 17 - name: Install wpiformat - run: pip3 install wpiformat==2024.44 + run: pip3 install wpiformat==2024.45 - name: Run wpiformat run: wpiformat - name: Run spotlessApply diff --git a/.github/workflows/lint-format.yml b/.github/workflows/lint-format.yml index f289875be7..0a2dbc1a2b 100644 --- a/.github/workflows/lint-format.yml +++ b/.github/workflows/lint-format.yml @@ -27,7 +27,7 @@ jobs: with: python-version: '3.12' - name: Install wpiformat - run: pip3 install wpiformat==2024.44 + run: pip3 install wpiformat==2024.45 - name: Run run: wpiformat - name: Check output @@ -66,7 +66,7 @@ jobs: with: python-version: '3.12' - name: Install wpiformat - run: pip3 install wpiformat==2024.44 + run: pip3 install wpiformat==2024.45 - name: Create compile_commands.json run: | ./gradlew generateCompileCommands -Ptoolchain-optional-roboRio diff --git a/hal/generate_usage_reporting.py b/hal/generate_usage_reporting.py index 955be4f110..9953be3745 100755 --- a/hal/generate_usage_reporting.py +++ b/hal/generate_usage_reporting.py @@ -3,9 +3,9 @@ # Copyright (c) FIRST and other WPILib contributors. # Open Source Software; you can modify and/or share it under the terms of # the WPILib BSD license file in the root directory of this project. -from pathlib import Path -import sys import argparse +import sys +from pathlib import Path def generate_usage_reporting(output_directory: Path, template_directory: Path): diff --git a/shared/bazel/rules/gen/gen_resources.py b/shared/bazel/rules/gen/gen_resources.py index 869ff1d591..af0e6a2c07 100644 --- a/shared/bazel/rules/gen/gen_resources.py +++ b/shared/bazel/rules/gen/gen_resources.py @@ -1,6 +1,6 @@ -import os import argparse import binascii +import os def generate_file(resource_file, output_file, prefix, namespace): diff --git a/upstream_utils/apriltag.py b/upstream_utils/apriltag.py index 7fb5f673f2..ea95919417 100755 --- a/upstream_utils/apriltag.py +++ b/upstream_utils/apriltag.py @@ -3,11 +3,7 @@ import os import shutil -from upstream_utils import ( - comment_out_invalid_includes, - walk_cwd_and_copy_if, - Lib, -) +from upstream_utils import Lib, comment_out_invalid_includes, walk_cwd_and_copy_if def remove_tag(f: str): diff --git a/upstream_utils/eigen.py b/upstream_utils/eigen.py index 70e21549bc..cc4b102144 100755 --- a/upstream_utils/eigen.py +++ b/upstream_utils/eigen.py @@ -4,11 +4,7 @@ import os import re import shutil -from upstream_utils import ( - comment_out_invalid_includes, - walk_cwd_and_copy_if, - Lib, -) +from upstream_utils import Lib, comment_out_invalid_includes, walk_cwd_and_copy_if def eigen_inclusions(dp, f): diff --git a/upstream_utils/fmt.py b/upstream_utils/fmt.py index 947a1750fd..adf83d1bf0 100755 --- a/upstream_utils/fmt.py +++ b/upstream_utils/fmt.py @@ -3,10 +3,7 @@ import os import shutil -from upstream_utils import ( - walk_cwd_and_copy_if, - Lib, -) +from upstream_utils import Lib, walk_cwd_and_copy_if def copy_upstream_src(wpilib_root): diff --git a/upstream_utils/gcem.py b/upstream_utils/gcem.py index 05a1b7a859..1b4f2d1e44 100755 --- a/upstream_utils/gcem.py +++ b/upstream_utils/gcem.py @@ -3,10 +3,7 @@ import os import shutil -from upstream_utils import ( - walk_cwd_and_copy_if, - Lib, -) +from upstream_utils import Lib, walk_cwd_and_copy_if def copy_upstream_src(wpilib_root): diff --git a/upstream_utils/gl3w.py b/upstream_utils/gl3w.py index 8855fd9d4c..1858d675a6 100755 --- a/upstream_utils/gl3w.py +++ b/upstream_utils/gl3w.py @@ -2,10 +2,7 @@ import os -from upstream_utils import ( - walk_cwd_and_copy_if, - Lib, -) +from upstream_utils import Lib, walk_cwd_and_copy_if def copy_upstream_src(wpilib_root): diff --git a/upstream_utils/glfw.py b/upstream_utils/glfw.py index 6a4c77a315..a2d7e84540 100755 --- a/upstream_utils/glfw.py +++ b/upstream_utils/glfw.py @@ -3,10 +3,7 @@ import os import shutil -from upstream_utils import ( - walk_cwd_and_copy_if, - Lib, -) +from upstream_utils import Lib, walk_cwd_and_copy_if def matches(dp, f, allowed_files): diff --git a/upstream_utils/googletest.py b/upstream_utils/googletest.py index b164228328..60613ee535 100755 --- a/upstream_utils/googletest.py +++ b/upstream_utils/googletest.py @@ -3,11 +3,7 @@ import os import shutil -from upstream_utils import ( - walk_cwd_and_copy_if, - walk_if, - Lib, -) +from upstream_utils import Lib, walk_cwd_and_copy_if, walk_if EXCLUDED_FILES = [ "gtest_main.cc", diff --git a/upstream_utils/imgui.py b/upstream_utils/imgui.py index d682848071..170cf41991 100755 --- a/upstream_utils/imgui.py +++ b/upstream_utils/imgui.py @@ -3,10 +3,7 @@ import os import shutil -from upstream_utils import ( - walk_cwd_and_copy_if, - Lib, -) +from upstream_utils import Lib, walk_cwd_and_copy_if def matches(dp, f, allowed_files): diff --git a/upstream_utils/implot.py b/upstream_utils/implot.py index 00bf796e76..73101e84d9 100755 --- a/upstream_utils/implot.py +++ b/upstream_utils/implot.py @@ -3,10 +3,7 @@ import os import shutil -from upstream_utils import ( - walk_cwd_and_copy_if, - Lib, -) +from upstream_utils import Lib, walk_cwd_and_copy_if def matches(dp, f, allowed_files): diff --git a/upstream_utils/json.py b/upstream_utils/json.py index 46b49a3903..050e4dd66e 100755 --- a/upstream_utils/json.py +++ b/upstream_utils/json.py @@ -3,10 +3,7 @@ import os import shutil -from upstream_utils import ( - walk_if, - Lib, -) +from upstream_utils import Lib, walk_if def copy_upstream_src(wpilib_root): diff --git a/upstream_utils/libuv.py b/upstream_utils/libuv.py index 0c48d0f90d..c837fe96be 100755 --- a/upstream_utils/libuv.py +++ b/upstream_utils/libuv.py @@ -3,10 +3,7 @@ import os import shutil -from upstream_utils import ( - walk_cwd_and_copy_if, - Lib, -) +from upstream_utils import Lib, walk_cwd_and_copy_if def copy_upstream_src(wpilib_root): diff --git a/upstream_utils/memory.py b/upstream_utils/memory.py index 85b69dfaf8..0099de5ea9 100755 --- a/upstream_utils/memory.py +++ b/upstream_utils/memory.py @@ -3,11 +3,7 @@ import os import shutil -from upstream_utils import ( - walk_if, - copy_to, - Lib, -) +from upstream_utils import Lib, copy_to, walk_if def run_source_replacements(memory_files): diff --git a/upstream_utils/mpack.py b/upstream_utils/mpack.py index 103c67be9e..1acff50a37 100755 --- a/upstream_utils/mpack.py +++ b/upstream_utils/mpack.py @@ -4,10 +4,7 @@ import os import shutil import subprocess -from upstream_utils import ( - walk_cwd_and_copy_if, - Lib, -) +from upstream_utils import Lib, walk_cwd_and_copy_if def copy_upstream_src(wpilib_root): diff --git a/upstream_utils/protobuf.py b/upstream_utils/protobuf.py index cb2e5f09e9..fc7055f524 100755 --- a/upstream_utils/protobuf.py +++ b/upstream_utils/protobuf.py @@ -3,11 +3,7 @@ import os import shutil -from upstream_utils import ( - copy_to, - walk_if, - Lib, -) +from upstream_utils import Lib, copy_to, walk_if protobuf_lite_sources = set( [ diff --git a/upstream_utils/sleipnir.py b/upstream_utils/sleipnir.py index 28d2fb38e5..9b5d3e6aae 100755 --- a/upstream_utils/sleipnir.py +++ b/upstream_utils/sleipnir.py @@ -3,10 +3,7 @@ import os import shutil -from upstream_utils import ( - copy_to, - Lib, -) +from upstream_utils import Lib, copy_to def copy_upstream_src(wpilib_root): diff --git a/upstream_utils/stb.py b/upstream_utils/stb.py index 72a0b8811c..06fb69a396 100755 --- a/upstream_utils/stb.py +++ b/upstream_utils/stb.py @@ -3,10 +3,7 @@ import os import shutil -from upstream_utils import ( - walk_cwd_and_copy_if, - Lib, -) +from upstream_utils import Lib, walk_cwd_and_copy_if def copy_upstream_src(wpilib_root): diff --git a/wpilibNewCommands/generate_hids.py b/wpilibNewCommands/generate_hids.py index 6e349d94b4..51093191fa 100755 --- a/wpilibNewCommands/generate_hids.py +++ b/wpilibNewCommands/generate_hids.py @@ -3,9 +3,9 @@ # Copyright (c) FIRST and other WPILib contributors. # Open Source Software; you can modify and/or share it under the terms of # the WPILib BSD license file in the root directory of this project. +import argparse import json import sys -import argparse from pathlib import Path from jinja2 import Environment, FileSystemLoader diff --git a/wpilibc/generate_hids.py b/wpilibc/generate_hids.py index 76a879c123..bd8e2cf338 100755 --- a/wpilibc/generate_hids.py +++ b/wpilibc/generate_hids.py @@ -3,9 +3,9 @@ # Copyright (c) FIRST and other WPILib contributors. # Open Source Software; you can modify and/or share it under the terms of # the WPILib BSD license file in the root directory of this project. +import argparse import json import sys -import argparse from pathlib import Path from jinja2 import Environment, FileSystemLoader diff --git a/wpilibc/generate_pwm_motor_controllers.py b/wpilibc/generate_pwm_motor_controllers.py index a04b918cc4..1741b71a91 100755 --- a/wpilibc/generate_pwm_motor_controllers.py +++ b/wpilibc/generate_pwm_motor_controllers.py @@ -5,10 +5,10 @@ # the WPILib BSD license file in the root directory of this project. import argparse import json -import sys import os -from typing import Dict, Any +import sys from pathlib import Path +from typing import Any, Dict from jinja2 import Environment, FileSystemLoader from jinja2.environment import Template diff --git a/wpilibj/generate_hids.py b/wpilibj/generate_hids.py index aaa13bf7cf..f8391a9ec3 100755 --- a/wpilibj/generate_hids.py +++ b/wpilibj/generate_hids.py @@ -3,9 +3,9 @@ # Copyright (c) FIRST and other WPILib contributors. # Open Source Software; you can modify and/or share it under the terms of # the WPILib BSD license file in the root directory of this project. +import argparse import json import sys -import argparse from pathlib import Path from jinja2 import Environment, FileSystemLoader diff --git a/wpilibj/generate_pwm_motor_controllers.py b/wpilibj/generate_pwm_motor_controllers.py index a8dd780207..b5af130bd5 100755 --- a/wpilibj/generate_pwm_motor_controllers.py +++ b/wpilibj/generate_pwm_motor_controllers.py @@ -7,7 +7,7 @@ import argparse import json import sys from pathlib import Path -from typing import Dict, Any +from typing import Any, Dict from jinja2 import Environment, FileSystemLoader from jinja2.environment import Template diff --git a/wpimath/generate_numbers.py b/wpimath/generate_numbers.py index b95800e4d4..dd0eb80251 100755 --- a/wpimath/generate_numbers.py +++ b/wpimath/generate_numbers.py @@ -4,11 +4,12 @@ # Open Source Software; you can modify and/or share it under the terms of # the WPILib BSD license file in the root directory of this project. -import sys import argparse -from jinja2 import Environment, FileSystemLoader +import sys from pathlib import Path +from jinja2 import Environment, FileSystemLoader + def output(output_dir: Path, outfn: str, contents: str): output_dir.mkdir(parents=True, exist_ok=True) diff --git a/wpimath/generate_quickbuf.py b/wpimath/generate_quickbuf.py index 944cc34d5d..98f2789ef0 100755 --- a/wpimath/generate_quickbuf.py +++ b/wpimath/generate_quickbuf.py @@ -3,9 +3,8 @@ # Copyright (c) FIRST and other WPILib contributors. # Open Source Software; you can modify and/or share it under the terms of # the WPILib BSD license file in the root directory of this project. -import subprocess -import sys import argparse +import subprocess import sys from pathlib import Path diff --git a/wpiutil/examples/printlog/datalog.py b/wpiutil/examples/printlog/datalog.py index 5bc50cc5b2..649212575c 100755 --- a/wpiutil/examples/printlog/datalog.py +++ b/wpiutil/examples/printlog/datalog.py @@ -5,9 +5,10 @@ import array import struct -import msgpack from typing import List, SupportsBytes +import msgpack + __all__ = ["StartRecordData", "MetadataRecordData", "DataLogRecord", "DataLogReader"] floatStruct = struct.Struct("", file=sys.stderr)