Skip to content

Fix regression when changing the FC connection type#1009

Merged
amilcarlucas merged 1 commit into
masterfrom
fix_FC_conn
Nov 1, 2025
Merged

Fix regression when changing the FC connection type#1009
amilcarlucas merged 1 commit into
masterfrom
fix_FC_conn

Conversation

@amilcarlucas

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings November 1, 2025 16:23
@amilcarlucas amilcarlucas merged commit ea0f4c0 into master Nov 1, 2025
25 checks passed
@amilcarlucas amilcarlucas deleted the fix_FC_conn branch November 1, 2025 16:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the update_protocol_combobox_entries method to optimize validation logic and improve code clarity. The method now validates the current protocol selection before updating the combobox instead of updating it twice (once with the current selection and once with None if invalid).

Key changes:

  • Refactored validation logic to check protocol validity before updating the combobox
  • Replaced .format(**locals()) with explicit named parameters for better code clarity and safety
  • Updated test assertions to reflect the single combobox update call instead of two

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
ardupilot_methodic_configurator/frontend_tkinter_component_editor.py Refactored update_protocol_combobox_entries to validate selection first and update combobox once; improved error message formatting
tests/test_frontend_tkinter_component_editor.py Updated test assertions to expect single set_entries_tuple call instead of two; updated comments to reflect new behavior
Comments suppressed due to low confidence (1)

tests/test_frontend_tkinter_component_editor.py:37

        editor = ComponentEditorWindow()  # pylint: disable=no-value-for-parameter

@github-actions

github-actions Bot commented Nov 1, 2025

Copy link
Copy Markdown
Contributor

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
8897 7514 84% 80% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
ardupilot_methodic_configurator/frontend_tkinter_component_editor.py 89% 🟢
TOTAL 89% 🟢

updated for commit: 8098a2d by action🐍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants