Skip to content

Commit 187cf8b

Browse files
committed
FIX: #80
1 parent 2b47cd4 commit 187cf8b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

ardupilot_methodic_configurator/__main__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,10 @@ def component_editor(
109109
component_editor_window.set_vehicle_configuration_template(vehicle_dir_window.configuration_template)
110110
if args.skip_component_editor:
111111
component_editor_window.root.after(10, component_editor_window.root.destroy)
112-
elif bool(ProgramSettings.get_setting("auto_open_doc_in_browser")) and flight_controller.info.firmware_type != _(
113-
"Unknown"
112+
elif (
113+
bool(ProgramSettings.get_setting("auto_open_doc_in_browser"))
114+
and flight_controller.info.firmware_type != _("Unknown")
115+
and flight_controller.info.firmware_type != ""
114116
):
115117
url = (
116118
"https://github.com/ArduPilot/ardupilot/blob/master/libraries/AP_HAL_ChibiOS/hwdef/"

ardupilot_methodic_configurator/frontend_tkinter_parameter_editor_documentation_frame.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ def __update_documentation_label(self, label_key: str, text: str, url: str, url_
126126
label = self.documentation_labels[label_key]
127127
if url:
128128
label.config(text=text, foreground="blue", cursor="hand2", underline=True)
129-
label.bind("<Button-1>", lambda url=url: webbrowser_open(url)) # type: ignore[misc]
129+
label.bind("<Button-1>", lambda event: webbrowser_open(url)) # noqa: ARG005
130130
show_tooltip(label, url)
131131
else:
132132
label.config(text=text, foreground="black", cursor="arrow", underline=False)
133-
label.bind("<Button-1>", None)
133+
label.bind("<Button-1>", lambda event: None) # noqa: ARG005
134134
if url_expected:
135135
show_tooltip(label, _("Documentation URL not available"))

0 commit comments

Comments
 (0)