@@ -25,7 +25,7 @@ class TestLocalFilesystem(unittest.TestCase): # pylint: disable=too-many-public
2525 def test_read_params_from_files (self ) -> None :
2626 """Test reading parameters from files with proper filtering."""
2727 mock_vehicle_dir = "/mock/dir"
28- filesystem = LocalFilesystem (mock_vehicle_dir , "ArduCopter" , "4.3.0" , False ) # noqa: FBT003
28+ filesystem = LocalFilesystem (mock_vehicle_dir , "ArduCopter" , "4.3.0" , allow_editing_template_files = False )
2929
3030 with (
3131 patch (
@@ -57,7 +57,7 @@ def test_str_to_bool(self) -> None:
5757 def test_re_init (self ) -> None :
5858 """Test reinitializing the filesystem with new parameters."""
5959 mock_vehicle_dir = "/mock/dir"
60- filesystem = LocalFilesystem (mock_vehicle_dir , "ArduCopter" , "4.3.0" , False ) # noqa: FBT003
60+ filesystem = LocalFilesystem (mock_vehicle_dir , "ArduCopter" , "4.3.0" , allow_editing_template_files = False )
6161
6262 with (
6363 patch .object (filesystem , "load_vehicle_components_json_data" , return_value = True ),
@@ -73,7 +73,7 @@ def test_re_init(self) -> None:
7373 def test_vehicle_configuration_files_exist (self ) -> None :
7474 """Test checking if vehicle configuration files exist."""
7575 mock_vehicle_dir = "/mock/dir"
76- filesystem = LocalFilesystem (mock_vehicle_dir , "ArduCopter" , "4.3.0" , False ) # noqa: FBT003
76+ filesystem = LocalFilesystem (mock_vehicle_dir , "ArduCopter" , "4.3.0" , allow_editing_template_files = False )
7777
7878 with (
7979 patch ("ardupilot_methodic_configurator.backend_filesystem.os_path.exists" , return_value = True ),
@@ -96,7 +96,7 @@ def test_vehicle_configuration_files_exist(self) -> None:
9696 def test_rename_parameter_files (self ) -> None :
9797 """Test renaming parameter files."""
9898 mock_vehicle_dir = "/mock/dir"
99- filesystem = LocalFilesystem (mock_vehicle_dir , "ArduCopter" , "4.3.0" , False ) # noqa: FBT003
99+ filesystem = LocalFilesystem (mock_vehicle_dir , "ArduCopter" , "4.3.0" , allow_editing_template_files = False )
100100 filesystem .configuration_steps = {"new_file.param" : {"old_filenames" : ["old_file.param" ]}}
101101
102102 with (
@@ -185,7 +185,7 @@ def test_getcwd(self) -> None:
185185 """Test getting current working directory."""
186186 mock_vehicle_dir = "/mock/dir"
187187 mock_cwd = "/test/dir"
188- filesystem = LocalFilesystem (mock_vehicle_dir , "ArduCopter" , "4.3.0" , False ) # noqa: FBT003
188+ filesystem = LocalFilesystem (mock_vehicle_dir , "ArduCopter" , "4.3.0" , allow_editing_template_files = False )
189189
190190 with patch ("ardupilot_methodic_configurator.backend_filesystem.os_getcwd" , return_value = mock_cwd ) as mock_getcwd :
191191 result = filesystem .getcwd ()
@@ -308,7 +308,7 @@ def test_get_start_file_empty_files(self) -> None:
308308 """Test get_start_file with empty files list."""
309309 lfs = LocalFilesystem ("vehicle_dir" , "vehicle_type" , None , allow_editing_template_files = False )
310310 lfs .file_parameters = {}
311- result = lfs .get_start_file (1 , True ) # noqa: FBT003
311+ result = lfs .get_start_file (1 , tcal_available = True )
312312 assert result == ""
313313
314314 def test_get_eval_variables_with_none (self ) -> None :
@@ -386,19 +386,19 @@ def test_get_start_file(self) -> None:
386386 lfs .file_parameters = {"01_file.param" : {}, "02_file.param" : {}, "03_file.param" : {}}
387387
388388 # Test with explicit index
389- result = lfs .get_start_file (1 , True ) # noqa: FBT003
389+ result = lfs .get_start_file (1 , tcal_available = True )
390390 assert result == "02_file.param"
391391
392392 # Test with out of range index
393- result = lfs .get_start_file (5 , True ) # noqa: FBT003
393+ result = lfs .get_start_file (5 , tcal_available = True )
394394 assert result == "03_file.param"
395395
396396 # Test with tcal available
397- result = lfs .get_start_file (- 1 , True ) # noqa: FBT003
397+ result = lfs .get_start_file (- 1 , tcal_available = True )
398398 assert result == "01_file.param"
399399
400400 # Test with tcal not available
401- result = lfs .get_start_file (- 1 , False ) # noqa: FBT003
401+ result = lfs .get_start_file (- 1 , tcal_available = False )
402402 assert result == "03_file.param"
403403
404404 def test_get_eval_variables (self ) -> None :
@@ -522,15 +522,15 @@ def test_export_to_param(self) -> None:
522522 mock_format .return_value = "formatted_params"
523523
524524 # Test with documentation annotation
525- lfs .export_to_param (test_params , "test.param" , True ) # noqa: FBT003
525+ lfs .export_to_param (test_params , "test.param" , annotate_doc = True )
526526 mock_format .assert_called_with (test_params )
527527 mock_export .assert_called_with ("formatted_params" , os_path .join ("vehicle_dir" , "test.param" ))
528528 mock_update .assert_called_once ()
529529
530530 # Test without documentation annotation
531531 mock_export .reset_mock ()
532532 mock_update .reset_mock ()
533- lfs .export_to_param (test_params , "test.param" , False ) # noqa: FBT003
533+ lfs .export_to_param (test_params , "test.param" , annotate_doc = False )
534534 mock_export .assert_called_once ()
535535 mock_update .assert_not_called ()
536536
0 commit comments