Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def _validate_entry_limits_ui(self, event: Union[None, tk.Event], entry: ttk.Ent


# pylint: disable=duplicate-code
if __name__ == "__main__":
if __name__ == "__main__": # pragma: no cover
args = argument_parser()

logging_basicConfig(level=logging_getLevelName(args.loglevel), format="%(asctime)s - %(levelname)s - %(message)s")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ def create_for_testing(
return instance


if __name__ == "__main__":
if __name__ == "__main__": # pragma: no cover
args = argument_parser()

logging_basicConfig(level=logging_getLevelName(args.loglevel), format="%(asctime)s - %(levelname)s - %(message)s")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ def skip_fc_connection(self, flight_controller: FlightController) -> None:
self.root.destroy()


def argument_parser() -> Namespace:
def argument_parser() -> Namespace: # pragma: no cover
"""
Parses command-line arguments for the script.

Expand All @@ -360,7 +360,7 @@ def argument_parser() -> Namespace:


# pylint: disable=duplicate-code
def main() -> None:
def main() -> None: # pragma: no cover
args = argument_parser()

logging_basicConfig(level=logging_getLevelName(args.loglevel), format="%(asctime)s - %(levelname)s - %(message)s")
Expand All @@ -379,5 +379,5 @@ def main() -> None:
flight_controller.disconnect() # Disconnect from the flight controller


if __name__ == "__main__":
if __name__ == "__main__": # pragma: no cover
main()
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ def on_close(self) -> None:
self.root.destroy()


def argument_parser() -> Namespace:
def argument_parser() -> Namespace: # pragma: no cover
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The argument_parser function should not be excluded from coverage. This function is tested in tests/test_frontend_tkinter_motor_test.py (see test_argument_parser_wires_common_arguments), and excluding it from coverage will hide the fact that it has test coverage. Remove the pragma comment to allow coverage tracking for this tested function.

Copilot uses AI. Check for mistakes.
"""
Parses command-line arguments for the script.

Expand Down Expand Up @@ -806,7 +806,7 @@ def argument_parser() -> Namespace:


# pylint: disable=duplicate-code
def main() -> None:
def main() -> None: # pragma: no cover
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The main function should not be excluded from coverage. This function is tested in tests/test_frontend_tkinter_motor_test.py (see test_main_success_and_failure_paths), and excluding it from coverage will hide the fact that it has test coverage. Remove the pragma comment to allow coverage tracking for this tested function.

Copilot uses AI. Check for mistakes.
args = argument_parser()

state = ApplicationState(args)
Expand Down Expand Up @@ -865,5 +865,5 @@ def register_motor_test_plugin() -> None:
plugin_factory.register(PLUGIN_MOTOR_TEST, _create_motor_test_view)


if __name__ == "__main__":
if __name__ == "__main__": # pragma: no cover
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The if __name__ == "__main__" block should not be excluded from coverage. While this is typically used as an entry point, excluding it without evidence that it's never used in production or that tests exist that should bypass it is premature. Since the main() function it calls is tested, the coverage tool should be able to track whether this entry point is ever executed during testing.

Copilot uses AI. Check for mistakes.
main()
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ def destroy_tooltip(self) -> None:
self.tooltip = None


def argument_parser() -> Namespace:
def argument_parser() -> Namespace: # pragma: no cover
"""
Parses command-line arguments for the script.

Expand All @@ -367,7 +367,7 @@ def argument_parser() -> Namespace:
return add_common_arguments(parser).parse_args()


def main() -> None:
def main() -> None: # pragma: no cover
argsp = argument_parser()

logging_basicConfig(level=logging_getLevelName(argsp.loglevel), format="%(asctime)s - %(levelname)s - %(message)s")
Expand Down Expand Up @@ -417,5 +417,5 @@ def main() -> None:
root.mainloop()


if __name__ == "__main__":
if __name__ == "__main__": # pragma: no cover
main()
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ def add_argparse_arguments(parser: ArgumentParser) -> ArgumentParser:
return parser


def argument_parser() -> Namespace:
def argument_parser() -> Namespace: # pragma: no cover
"""
Parses command-line arguments for the script.

Expand All @@ -1163,7 +1163,7 @@ def argument_parser() -> Namespace:
return add_common_arguments(parser).parse_args()


if __name__ == "__main__":
if __name__ == "__main__": # pragma: no cover
args = argument_parser()

logging_basicConfig(level=logging_getLevelName(args.loglevel), format="%(asctime)s - %(levelname)s - %(message)s")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def create_new_vehicle_from_template(self) -> None:


# pylint: disable=duplicate-code
def argument_parser() -> Namespace:
def argument_parser() -> Namespace: # pragma: no cover
"""
Set up and parse command-line arguments for development/testing purposes.

Expand All @@ -222,7 +222,7 @@ def argument_parser() -> Namespace:
return add_common_arguments(parser).parse_args()


def main() -> None:
def main() -> None: # pragma: no cover
args = argument_parser()

logging_basicConfig(level=logging_getLevelName(args.loglevel), format="%(asctime)s - %(levelname)s - %(message)s")
Expand Down Expand Up @@ -254,5 +254,5 @@ def main() -> None:
# pylint: enable=duplicate-code


if __name__ == "__main__":
if __name__ == "__main__": # pragma: no cover
main()
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def open_last_vehicle_directory(self, last_vehicle_dir: str) -> None:


# pylint: disable=duplicate-code
def argument_parser() -> Namespace:
def argument_parser() -> Namespace: # pragma: no cover
"""
Parses command-line arguments for the script.

Expand All @@ -194,7 +194,7 @@ def argument_parser() -> Namespace:
return add_common_arguments(parser).parse_args()


def main() -> None:
def main() -> None: # pragma: no cover
args = argument_parser()

logging_basicConfig(level=logging_getLevelName(args.loglevel), format="%(asctime)s - %(levelname)s - %(message)s")
Expand Down Expand Up @@ -226,5 +226,5 @@ def main() -> None:
# pylint: enable=duplicate-code


if __name__ == "__main__":
if __name__ == "__main__": # pragma: no cover
main()
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def update_progress(self, current_file: int) -> None:
phase["bar"]["value"] = 0


def argument_parser() -> argparse.Namespace:
def argument_parser() -> argparse.Namespace: # pragma: no cover
"""
Parses command-line arguments for the script.

Expand All @@ -221,7 +221,7 @@ def argument_parser() -> argparse.Namespace:
return add_common_arguments(parser).parse_args()


def main() -> None:
def main() -> None: # pragma: no cover
args = argument_parser()

logging_basicConfig(level=logging_getLevelName(args.loglevel), format="%(asctime)s - %(levelname)s - %(message)s")
Expand Down Expand Up @@ -252,5 +252,5 @@ def update_demo() -> None:
root.mainloop()


if __name__ == "__main__":
if __name__ == "__main__": # pragma: no cover
main()
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def get_vehicle_image_filepath(self, template_path: str) -> str:
return self.vehicle_components_provider.get_vehicle_image_filepath(template_path)


def argument_parser() -> argparse.Namespace:
def argument_parser() -> argparse.Namespace: # pragma: no cover
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The argument_parser function should not be excluded from coverage. This function is tested in tests/test_frontend_tkinter_template_overview.py (see test_argument_parser_loglevel_options), and excluding it from coverage will hide the fact that it has test coverage. Remove the pragma comment to allow coverage tracking for this tested function.

Copilot uses AI. Check for mistakes.
"""
Parses command-line arguments for the script.

Expand Down Expand Up @@ -412,7 +412,7 @@ def setup_logging(loglevel: str) -> None:
logging_basicConfig(level=logging_getLevelName(loglevel), format="%(asctime)s - %(levelname)s - %(message)s")


def main() -> None:
def main() -> None: # pragma: no cover
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The main function should not be excluded from coverage. This function is tested in tests/test_frontend_tkinter_template_overview.py (see test_main_function_logs_recently_used_directory_when_available and test_main_function_handles_no_recently_used_directories), and excluding it from coverage will hide the fact that it has test coverage. Remove the pragma comment to allow coverage tracking for this tested function.

Copilot uses AI. Check for mistakes.
"""Main entry point for the application."""
args = argument_parser()
setup_logging(args.loglevel)
Expand All @@ -424,5 +424,5 @@ def main() -> None:
logging_info(ProgramSettings.get_recently_used_dirs()[0])


if __name__ == "__main__":
if __name__ == "__main__": # pragma: no cover
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The if __name__ == "__main__" block should not be excluded from coverage. While this is typically used as an entry point, excluding it without evidence that it's never used in production or that tests exist that should bypass it is premature. Since the main() function it calls is tested, the coverage tool should be able to track whether this entry point is ever executed during testing.

Copilot uses AI. Check for mistakes.
main()
Loading