← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~lgp171188/lpcraft:add-clean-command-clean-flag into lpcraft:main

 

> I have already run the linters locally before I created this merge proposal and did not see any linter errors. Did you see any issues?


Yes.

```
$ tox -e lint
lint installed: cfgv==3.3.1,distlib==0.3.4,filelock==3.6.0,identify==2.4.11,nodeenv==1.6.0,platformdirs==2.5.1,pre-commit==2.17.0,PyYAML==6.0,six==1.16.0,toml==0.10.2,virtualenv==20.13.3
lint run-test-pre: PYTHONHASHSEED='2340328035'
lint run-test: commands[0] | pre-commit run -a
Check for added large files..............................................Passed
Check python ast.........................................................Passed
Check for merge conflicts................................................Passed
Check Yaml...............................................................Passed
Debug Statements (Python)................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

lpcraft/commands/tests/test_clean.py:42:80: E501 line too long (81 > 79 characters)
lpcraft/commands/tests/test_clean.py:97:80: E501 line too long (87 > 79 characters)

isort....................................................................Passed
black....................................................................Failed
- hook id: black
- files were modified by this hook

reformatted lpcraft/commands/tests/test_clean.py
All done! ✨ 🍰 ✨
1 file reformatted, 41 files left unchanged.

setup-cfg-fmt............................................................Passed
ERROR: InvocationError for command /home/jugmac00/Projects/lpcraft/.tox/lint/bin/pre-commit run -a (exited with code 1)
_________________________________________________________________________________________________ summary _________________________________________________________________________________________________
ERROR:   lint: commands failed
jugmac00@XPS-13-9310:~/Projects/lpcraft$ git diff
diff --git a/lpcraft/commands/tests/test_clean.py b/lpcraft/commands/tests/test_clean.py
index cd042d8..a582e81 100644
--- a/lpcraft/commands/tests/test_clean.py
+++ b/lpcraft/commands/tests/test_clean.py
@@ -39,7 +39,8 @@ class TestClean(CommandBaseTestCase):
             ),
         )
         tmp_config_file = os.path.join(
-            self.tmp_project_path, "test-clean-config/lpcraft-configuration.yaml"
+            self.tmp_project_path,
+            "test-clean-config/lpcraft-configuration.yaml",
         )
         result = self.run_command("clean", "-c", tmp_config_file)
 
@@ -50,15 +51,13 @@ class TestClean(CommandBaseTestCase):
                 errors=[
                     ConfigurationError(
                         f"Couldn't find config file '{tmp_config_file}'"
-                        )
+                    )
                 ],
-            )
+            ),
         )
 
     @patch("lpcraft.commands.clean.get_provider")
-    def test_lxd_not_ready(
-            self, mock_get_provider
-    ):
+    def test_lxd_not_ready(self, mock_get_provider):
         mock_get_provider.return_value = makeLXDProvider(is_ready=False)
         config = dedent(
```

This still applies after your latest force-push.
             """
@@ -81,7 +80,7 @@ class TestClean(CommandBaseTestCase):
     @patch("lpcraft.commands.clean.get_provider")
     @patch("lpcraft.providers._lxd.LXDProvider.clean_project_environments")
     def test_clean_cleans_project_environments(
-            self, mock_clean_project_environments, mock_get_provider
+        self, mock_clean_project_environments, mock_get_provider
     ):
         mock_get_provider.return_value = makeLXDProvider(is_ready=True)
 
@@ -94,5 +93,6 @@ class TestClean(CommandBaseTestCase):
         Path(".launchpad.yaml").write_text(config)
         self.run_command("clean")
         mock_clean_project_environments.assert_called_with(
-            project_name=self.tmp_project_path.name, project_path=self.tmp_project_path
+            project_name=self.tmp_project_path.name,
+            project_path=self.tmp_project_path,
         )

```
-- 
https://code.launchpad.net/~lgp171188/lpcraft/+git/lpcraft/+merge/416656
Your team Launchpad code reviewers is requested to review the proposed merge of ~lgp171188/lpcraft:add-clean-command-clean-flag into lpcraft:main.



Follow ups

References