{"results":{"result":{"added-files":{"code-health":10.0,"old-code-health":0.0,"files":[{"file":"test/components/polylith/test/test_core.py","loc":25,"code-health":10.0}]},"external-review-url":"https://github.com/DavidVujic/python-polylith/pull/460","old-code-health":10.0,"modified-files":{"code-health":9.951338872166916,"old-code-health":10.0,"files":[{"file":"components/polylith/commands/test.py","loc":56,"old-loc":38,"code-health":10.0,"old-code-health":10.0},{"file":"components/polylith/test/core.py","loc":44,"old-loc":22,"code-health":10.0,"old-code-health":10.0},{"file":"bases/polylith/cli/test.py","loc":27,"old-loc":24,"code-health":9.6882083290695,"old-code-health":10.0},{"file":"components/polylith/poetry/commands/test.py","loc":46,"old-loc":39,"code-health":10.0,"old-code-health":10.0}]},"removed-files":{"code-health":0.0,"old-code-health":0.0,"files":[]},"external-review-id":"460","analysis-time":"2026-08-07T06:34:33Z","negative-impact-count":1,"suppressions":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"affected-hotspots":0,"commits":["4bfb49f11efa3c7f76e894b6ab190a6a6e553fb2","5b2e4715bda30669dc26b46988ee6c60782ad6a1","d355755161f1a5a073f165bffaa1dec5794257b9","88c5440542cf881dc22c7baa43eb076a075204d3","faed46ba094bba1649043dc428717ee9b61a687a","76614b31646fe789163a4fff04d62495b2fecb3d","7239cded5d7289cc042fc664557311c0de6ae254"],"is-negative-review":true,"negative-findings":{"number-of-types":1,"number-of-files-touched":1,"findings":[{"method":"diff_command","why-it-occurs":"Functions with many arguments indicate either a) low cohesion where the function has too many responsibilities, or b) a missing abstraction that encapsulates those arguments.\n\nThe threshold for the Python language is 4 function arguments.","name":"Excess Number of Function Arguments","file":"bases/polylith/cli/test.py","refactoring-examples":[{"architectural-component-id":null,"author-name":"David Vujic","training-data":{"loc-added":"6","loc-deleted":"3","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"david@vujic.se","commit-full-message":"* feat(hatch): get bricks from hatch project tomls\r\n\r\n* feat(hatch): update hatch project tomls with project bricks\r\n\r\n* feat(cli): add CLI base\r\n\r\n* refactor(poly info): refactor into a commands component, used by cli and poetry plugin\r\n\r\n* refactor(poly create): refactor into a commands component, used by cli and poetry plugin\r\n\r\n* refactor(poly diff): refactor into a commands component, used by cli and poetry plugin\r\n\r\n* refactpr(poly check): refactor into a commands component, used by cli and poetry plugin. Bump dependencies.\r\n\r\n* fix: bump package.lock in poetry plugin project\r\n\r\n* fix(poly libs): order summary and list according to components, bricks\r\n\r\n* refactor(poly libs): refactor into a commands component, used by cli and poetry plugin\r\n\r\n* refactor(poly sync): refactor into a commands component, used by cli and poetry plugin\r\n\r\n* feat(cli): add CLI project\r\n\r\n* refactor: to not always return the same value.\r\n\r\n* refactor: remove expression that always evaluates to true.\r\n\r\n* refactor: CodeScene notifies about Excess Number of Function Arguments\r\n\r\n* feat(cli): add entry point\r\n\r\n* feat(cli): unique top namespace in entry point\r\n\r\n* bump poetry plugin to 1.14.0\r\n\r\n* dev: add cli script entry point for dev testing purposes\r\n\r\n* docs(cli): add step-by-step quick start\r\n\r\n* docs: add info about the new CLI and Hatch support","commit-date":"2024-01-15T12:52:14Z","current-rev":"d400ea8","filename":"python-polylith/components/polylith/test/tests.py","previous-rev":"c60e57e","commit-title":"feat: Standalone CLI to enable using Polylith with Hatch (#145)","language":"Python","id":"ccfabe4b9a562f6cdc94ba7114f37c997bafa75d","model-score":0.93,"author-id":null,"project-id":36630,"delta-file-score":0.31179166,"diff":"diff --git a/components/polylith/test/tests.py b/components/polylith/test/tests.py\nindex 17a4045..475fa46 100644\n--- a/components/polylith/test/tests.py\n+++ b/components/polylith/test/tests.py\n@@ -15,5 +15,3 @@ def test_sample():\n \n-def create_test(\n-    root: Path, brick: str, namespace: str, package: str, modulename: str = \"core\"\n-) -> None:\n+def create_test(root: Path, options: dict) -> None:\n     if not parser.is_test_generation_enabled(root):\n@@ -21,2 +19,7 @@ def create_test(\n \n+    brick = options[\"brick\"]\n+    namespace = options[\"namespace\"]\n+    package = options[\"package\"]\n+    modulename = options[\"modulename\"]\n+\n     dirs_structure = parser.get_tests_structure_from_config(root)\n","improvement-type":"Excess Number of Function Arguments"},{"architectural-component-id":null,"author-name":"David Vujic","training-data":{"loc-added":"6","loc-deleted":"8","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"david@vujic.se","commit-full-message":"* feat(hatch): get bricks from hatch project tomls\r\n\r\n* feat(hatch): update hatch project tomls with project bricks\r\n\r\n* feat(cli): add CLI base\r\n\r\n* refactor(poly info): refactor into a commands component, used by cli and poetry plugin\r\n\r\n* refactor(poly create): refactor into a commands component, used by cli and poetry plugin\r\n\r\n* refactor(poly diff): refactor into a commands component, used by cli and poetry plugin\r\n\r\n* refactpr(poly check): refactor into a commands component, used by cli and poetry plugin. Bump dependencies.\r\n\r\n* fix: bump package.lock in poetry plugin project\r\n\r\n* fix(poly libs): order summary and list according to components, bricks\r\n\r\n* refactor(poly libs): refactor into a commands component, used by cli and poetry plugin\r\n\r\n* refactor(poly sync): refactor into a commands component, used by cli and poetry plugin\r\n\r\n* feat(cli): add CLI project\r\n\r\n* refactor: to not always return the same value.\r\n\r\n* refactor: remove expression that always evaluates to true.\r\n\r\n* refactor: CodeScene notifies about Excess Number of Function Arguments\r\n\r\n* feat(cli): add entry point\r\n\r\n* feat(cli): unique top namespace in entry point\r\n\r\n* bump poetry plugin to 1.14.0\r\n\r\n* dev: add cli script entry point for dev testing purposes\r\n\r\n* docs(cli): add step-by-step quick start\r\n\r\n* docs: add info about the new CLI and Hatch support","commit-date":"2024-01-15T12:52:14Z","current-rev":"d400ea8","filename":"python-polylith/components/polylith/interface/interfaces.py","previous-rev":"c60e57e","commit-title":"feat: Standalone CLI to enable using Polylith with Hatch (#145)","language":"Python","id":"a1b664ac80bf3b4a0a091ed9463fd89bea0c410a","model-score":0.74,"author-id":null,"project-id":36630,"delta-file-score":0.31179166,"diff":"diff --git a/components/polylith/interface/interfaces.py b/components/polylith/interface/interfaces.py\nindex a362d88..358b262 100644\n--- a/components/polylith/interface/interfaces.py\n+++ b/components/polylith/interface/interfaces.py\n@@ -1,3 +1,2 @@\n from pathlib import Path\n-from typing import Union\n \n@@ -16,3 +15,2 @@ from {namespace}.{package} import {modulename}\n __all__ = [\"{modulename}\"]\n-\n \"\"\"\n@@ -26,11 +24,10 @@ def to_namespaced_path(package: str) -> str:\n \n-def create_interface(\n-    path: Path,\n-    namespace: str,\n-    package: str,\n-    modulename: str,\n-    description: Union[str, None],\n-) -> None:\n+def create_interface(path: Path, options: dict) -> None:\n     interface = create_file(path, \"__init__.py\")\n \n+    namespace = options[\"namespace\"]\n+    package = options[\"package\"]\n+    description = options[\"description\"]\n+    modulename = options[\"modulename\"]\n+\n     package_path = to_namespaced_path(package)\n","improvement-type":"Excess Number of Function Arguments"},{"architectural-component-id":null,"author-name":"David Vujic","training-data":{"loc-added":"7","loc-deleted":"12","delta-cc-mean":"0.0","delta-cc-total":"0","delta-penalties":"1.0","delta-n-functions":"0","current-file-score":"10.0"},"author-email":"david@vujic.se","commit-full-message":"* feat(hatch): get bricks from hatch project tomls\r\n\r\n* feat(hatch): update hatch project tomls with project bricks\r\n\r\n* feat(cli): add CLI base\r\n\r\n* refactor(poly info): refactor into a commands component, used by cli and poetry plugin\r\n\r\n* refactor(poly create): refactor into a commands component, used by cli and poetry plugin\r\n\r\n* refactor(poly diff): refactor into a commands component, used by cli and poetry plugin\r\n\r\n* refactpr(poly check): refactor into a commands component, used by cli and poetry plugin. Bump dependencies.\r\n\r\n* fix: bump package.lock in poetry plugin project\r\n\r\n* fix(poly libs): order summary and list according to components, bricks\r\n\r\n* refactor(poly libs): refactor into a commands component, used by cli and poetry plugin\r\n\r\n* refactor(poly sync): refactor into a commands component, used by cli and poetry plugin\r\n\r\n* feat(cli): add CLI project\r\n\r\n* refactor: to not always return the same value.\r\n\r\n* refactor: remove expression that always evaluates to true.\r\n\r\n* refactor: CodeScene notifies about Excess Number of Function Arguments\r\n\r\n* feat(cli): add entry point\r\n\r\n* feat(cli): unique top namespace in entry point\r\n\r\n* bump poetry plugin to 1.14.0\r\n\r\n* dev: add cli script entry point for dev testing purposes\r\n\r\n* docs(cli): add step-by-step quick start\r\n\r\n* docs: add info about the new CLI and Hatch support","commit-date":"2024-01-15T12:52:14Z","current-rev":"d400ea8","filename":"python-polylith/components/polylith/bricks/brick.py","previous-rev":"c60e57e","commit-title":"feat: Standalone CLI to enable using Polylith with Hatch (#145)","language":"Python","id":"a4e321d62d79e8a370736a417374b66662d801ec","model-score":0.65,"author-id":null,"project-id":36630,"delta-file-score":0.31179166,"diff":"diff --git a/components/polylith/bricks/brick.py b/components/polylith/bricks/brick.py\nindex e08e494..597fdbe 100644\n--- a/components/polylith/bricks/brick.py\n+++ b/components/polylith/bricks/brick.py\n@@ -1,3 +1,2 @@\n from pathlib import Path\n-from typing import Union\n \n@@ -10,11 +9,7 @@ from polylith.workspace import parser\n \n-def create_brick(\n-    root: Path,\n-    brick: str,\n-    namespace: str,\n-    package: str,\n-    description: Union[str, None],\n-    modulename: str = \"core\",\n-) -> None:\n-    path_kwargs = {\"brick\": brick, \"namespace\": namespace, \"package\": package}\n+def create_brick(root: Path, options: dict) -> None:\n+    modulename = options[\"modulename\"]\n+    path_kwargs = {\n+        k: v for k, v in options.items() if k in {\"brick\", \"namespace\", \"package\"}\n+    }\n \n@@ -28,5 +23,5 @@ def create_brick(\n     create_file(d, f\"{modulename}.py\")\n-    create_interface(d, namespace, package, modulename, description)\n+    create_interface(d, options)\n \n     if parser.is_readme_generation_enabled(root):\n-        create_brick_readme(root / resources_path, package, brick, description)\n+        create_brick_readme(root / resources_path, options)\n","improvement-type":"Excess Number of Function Arguments"}],"change-level":"warning","is-hotspot?":false,"line":12,"what-changed":"diff_command has 5 arguments, max arguments = 4","how-to-fix":"Start by investigating the responsibilities of the function. Make sure it doesn't do too many things, in which case it should be split into smaller and more cohesive functions. Consider the refactoring [INTRODUCE PARAMETER OBJECT](https://refactoring.com/catalog/introduceParameterObject.html) to encapsulate arguments that refer to the same logical concept.","change-type":"introduced"}]},"positive-impact-count":0,"repo":"python-polylith","code-health":9.957482953964023,"version":"3.0","authors":["David Vujic"],"directives":{"added":[],"removed":[]},"positive-findings":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"notices":{"number-of-types":0,"number-of-files-touched":0,"findings":[]},"external-review-provider":"GitHub"},"analysistime":"2026-08-07T06:34:33.000Z","project-name":"Python-tools-for-the-Polylith-Architecture","repository":"https://github.com/DavidVujic/python-polylith.git"}}