diff --git a/tests/test_backend_filesystem.py b/tests/test_backend_filesystem.py index 2ba812d..60d310a 100755 --- a/tests/test_backend_filesystem.py +++ b/tests/test_backend_filesystem.py @@ -320,8 +320,8 @@ def test_tolerance_check_with_zero_values(self) -> None: def test_tolerance_handling(self) -> None: """Test parameter value tolerance checking.""" # Setup LocalFilesystem instance - from ardupilot_methodic_configurator.backend_filesystem import ( - is_within_tolerance, # pylint: disable=import-outside-toplevel + from ardupilot_methodic_configurator.backend_filesystem import ( # pylint: disable=import-outside-toplevel + is_within_tolerance, ) # Test cases within tolerance (default 0.1%) diff --git a/update_flight_controller_ids.py b/update_flight_controller_ids.py index 5e1be0f..8100835 100755 --- a/update_flight_controller_ids.py +++ b/update_flight_controller_ids.py @@ -76,10 +76,11 @@ def process_hwdef_files(base_directory: str) -> dict[str, tuple[int, int, int, s pid_name = str(c.get_config("USB_STRING_PRODUCT", default=dirname)).strip('"').strip("'") mcu_series = c.mcu_series hwdef_data[dirname] = (numeric_board_id, vid, pid, vid_name, pid_name, mcu_series) - return hwdef_data + # Sort the dictionary by the (dirname) key, so that python 3.13 produces similar results to python 3.12 + return dict(sorted(hwdef_data.items(), key=lambda x: x[0].lower())) -def create_dicts( +def create_dicts( # pylint: disable=too-many-locals hwdef_data: dict[str, tuple[int, int, int, str, str, str]], ) -> tuple[dict[int, str], dict[tuple[int, int], str], dict[int, str], dict[int, str], dict[int, str]]: vid_vendor_dict: dict[int, str] = {}