Skip to content

Commit

Permalink
IMPROVEMENT: pylint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
amilcarlucas committed Feb 1, 2025
1 parent abb27e4 commit c6928fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/test_backend_filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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%)
Expand Down
5 changes: 3 additions & 2 deletions update_flight_controller_ids.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()))

Check failure on line 80 in update_flight_controller_ids.py

View workflow job for this annotation

GitHub Actions / mypy

update_flight_controller_ids.py#L80

[error] Argument 1 to


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] = {}
Expand Down

0 comments on commit c6928fd

Please sign in to comment.