|
22 | 22 | from ardupilot_methodic_configurator.backend_filesystem_vehicle_components import VehicleComponents |
23 | 23 | from ardupilot_methodic_configurator.frontend_tkinter_template_overview import TemplateOverviewWindow, argument_parser, main |
24 | 24 |
|
25 | | -# pylint: disable=unused-argument,protected-access |
| 25 | +# pylint: disable=useless-suppression |
| 26 | +# pylint: disable=unused-argument,protected-access,invalid-name |
| 27 | +# pylint: enable=useless-suppression |
26 | 28 | # ruff: noqa: ARG001 |
27 | 29 |
|
28 | 30 |
|
@@ -401,8 +403,8 @@ def test_tree_bindings(self, mock_vehicle_components, mock_toplevel) -> None: |
401 | 403 | window.tree = MagicMock() |
402 | 404 |
|
403 | 405 | # Create mocks for the private methods using the correct name mangling format |
404 | | - window._TemplateOverviewWindow__on_row_selection_change = MagicMock() # pylint: disable=invalid-name |
405 | | - window._TemplateOverviewWindow__on_row_double_click = MagicMock() # pylint: disable=invalid-name |
| 406 | + window._TemplateOverviewWindow__on_row_selection_change = MagicMock() |
| 407 | + window._TemplateOverviewWindow__on_row_double_click = MagicMock() |
406 | 408 |
|
407 | 409 | # Manually call the binding code |
408 | 410 | window.tree.bind("<ButtonRelease-1>", window._TemplateOverviewWindow__on_row_selection_change) |
@@ -434,7 +436,7 @@ def test_column_heading_command(mock_vehicle_components, mock_toplevel) -> None: |
434 | 436 | window.tree["columns"] = ["col1", "col2"] |
435 | 437 |
|
436 | 438 | # Create a mock for __sort_by_column that we can track |
437 | | - window._TemplateOverviewWindow__sort_by_column = MagicMock() # pylint: disable=invalid-name |
| 439 | + window._TemplateOverviewWindow__sort_by_column = MagicMock() |
438 | 440 |
|
439 | 441 | # Directly call heading for each column instead of using a loop |
440 | 442 | window.tree.heading( |
@@ -797,7 +799,7 @@ def safe_after(ms, func) -> None: |
797 | 799 | window.root.after.side_effect = safe_after |
798 | 800 |
|
799 | 801 | # Create a mock update_selection that raises an exception |
800 | | - window._TemplateOverviewWindow__update_selection = MagicMock(side_effect=Exception("Test exception")) # pylint: disable=invalid-name |
| 802 | + window._TemplateOverviewWindow__update_selection = MagicMock(side_effect=Exception("Test exception")) |
801 | 803 |
|
802 | 804 | # Call the method |
803 | 805 | window._TemplateOverviewWindow__on_row_selection_change(mock_event) |
|
0 commit comments