diff --git a/MethodicConfigurator/frontend_tkinter_component_editor.py b/MethodicConfigurator/frontend_tkinter_component_editor.py index e9323aa..c35ca35 100644 --- a/MethodicConfigurator/frontend_tkinter_component_editor.py +++ b/MethodicConfigurator/frontend_tkinter_component_editor.py @@ -40,6 +40,7 @@ def argument_parser(): Returns: argparse.Namespace: An object containing the parsed arguments. """ + # pylint: disable=duplicate-code parser = ArgumentParser( description=_( "A GUI for editing JSON files that contain vehicle component configurations. " @@ -49,6 +50,7 @@ def argument_parser(): parser = LocalFilesystem.add_argparse_arguments(parser) parser = ComponentEditorWindow.add_argparse_arguments(parser) return add_common_arguments_and_parse(parser) + # pylint: enable=duplicate-code class VoltageTooLowError(Exception): diff --git a/MethodicConfigurator/frontend_tkinter_component_editor_base.py b/MethodicConfigurator/frontend_tkinter_component_editor_base.py index 52e873d..768fa9b 100644 --- a/MethodicConfigurator/frontend_tkinter_component_editor_base.py +++ b/MethodicConfigurator/frontend_tkinter_component_editor_base.py @@ -40,6 +40,7 @@ def argument_parser(): Returns: argparse.Namespace: An object containing the parsed arguments. """ + # pylint: disable=duplicate-code parser = ArgumentParser( description=_( "A GUI for editing JSON files that contain vehicle component configurations. " @@ -49,6 +50,7 @@ def argument_parser(): parser = LocalFilesystem.add_argparse_arguments(parser) parser = ComponentEditorWindowBase.add_argparse_arguments(parser) return add_common_arguments_and_parse(parser) + # pylint: enable=duplicate-code class ComponentEditorWindowBase(BaseWindow): diff --git a/MethodicConfigurator/frontend_tkinter_connection_selection.py b/MethodicConfigurator/frontend_tkinter_connection_selection.py index 7b3f9f3..fbc3b71 100644 --- a/MethodicConfigurator/frontend_tkinter_connection_selection.py +++ b/MethodicConfigurator/frontend_tkinter_connection_selection.py @@ -257,6 +257,7 @@ def argument_parser(): return add_common_arguments_and_parse(parser) +# pylint: disable=duplicate-code def main(): args = argument_parser() @@ -268,6 +269,7 @@ def main(): "another script" ) ) + # pylint: enable=duplicate-code flight_controller = FlightController(args.reboot_time) # Initialize your FlightController instance result = flight_controller.connect(device=args.device) # Connect to the flight controller diff --git a/MethodicConfigurator/frontend_tkinter_directory_selection.py b/MethodicConfigurator/frontend_tkinter_directory_selection.py index 9243213..fc71772 100644 --- a/MethodicConfigurator/frontend_tkinter_directory_selection.py +++ b/MethodicConfigurator/frontend_tkinter_directory_selection.py @@ -487,6 +487,7 @@ def argument_parser(): return add_common_arguments_and_parse(parser) +# pylint: disable=duplicate-code def main(): args = argument_parser() @@ -498,6 +499,7 @@ def main(): " called from another script" ) ) + # pylint: enable=duplicate-code local_filesystem = LocalFilesystem(args.vehicle_dir, args.vehicle_type, None, args.allow_editing_template_files)