{"language": "Python", "id": 48, "repo_owner": "hacs", "repo_name": "integration", "head_branch": "proxy-test", "workflow_name": "Lint", "workflow_filename": "lint.yaml", "workflow_path": ".github/workflows/lint.yaml", "contributor": "hacs", "sha_fail": "5fea24b4a3fc4952e83474db5e7dc05af9ec76f6", "sha_success": "bcf0ea6453a095804fdadff500d023a5a1e2d2c4", "workflow": "name: Lint\n\non:\n pull_request:\n branches:\n - main\n push:\n branches:\n - main\n\nconcurrency:\n group: lint-${{ github.ref }}\n cancel-in-progress: true\n\njobs:\n matrix:\n runs-on: ubuntu-latest\n name: Run ${{ matrix.check }}\n strategy:\n matrix:\n check:\n - pyupgrade\n - black\n - codespell\n - check-executables-have-shebangs\n - check-json\n - requirements-txt-fixer\n - check-ast\n - mixed-line-ending\n steps:\n - name: \ud83d\udce5 Checkout the repository\n uses: actions/checkout@v4.1.1\n\n - name: \ud83d\udee0\ufe0f Set up Python\n uses: actions/setup-python@v4.7.1\n id: python\n with:\n python-version: \"3.11\"\n\n - name: \ud83d\udce6 Install pre-commit\n run: |\n scripts/install/pip_packages pre-commit\n pre-commit install-hooks --config .github/pre-commit-config.yaml\n\n - name: \ud83c\udfc3 Run the check (${{ matrix.check }})\n run: pre-commit run --hook-stage manual ${{ matrix.check }} --all-files --config .github/pre-commit-config.yaml\n\n lint-json:\n runs-on: ubuntu-latest\n name: With JQ\n steps:\n - name: \ud83d\udce5 Checkout the repository\n uses: actions/checkout@v4.1.1\n\n - name: \ud83c\udfc3 Run validation\n run: jq -r -e -c . tests/fixtures/*.json", "logs": [{"step_name": "Run pyupgrade/5_\ud83c\udfc3 Run the check (pyupgrade).txt", "log": "##[group]Run pre-commit run --hook-stage manual pyupgrade --all-files --config .github/pre-commit-config.yaml\n\u001b[36;1mpre-commit run --hook-stage manual pyupgrade --all-files --config .github/pre-commit-config.yaml\u001b[0m\nshell: /usr/bin/bash -e {0}\nenv:\n pythonLocation: /opt/hostedtoolcache/Python/3.11.6/x64\n PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.6/x64/lib/pkgconfig\n Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64\n Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64\n Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64\n LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.6/x64/lib\n##[endgroup]\npyupgrade................................................................Failed\n- hook id: pyupgrade\n- exit code: 1\n- files were modified by this hook\n\nRewriting tests/repositories/test_get_hacs_json.py\nRewriting tests/repositories/test_get_documentation.py\n\n##[error]Process completed with exit code 1.\n"}, {"step_name": "Run black/5_\ud83c\udfc3 Run the check (black).txt", "log": "##[group]Run pre-commit run --hook-stage manual black --all-files --config .github/pre-commit-config.yaml\n\u001b[36;1mpre-commit run --hook-stage manual black --all-files --config .github/pre-commit-config.yaml\u001b[0m\nshell: /usr/bin/bash -e {0}\nenv:\n pythonLocation: /opt/hostedtoolcache/Python/3.11.6/x64\n PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.6/x64/lib/pkgconfig\n Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64\n Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64\n Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.6/x64\n LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.6/x64/lib\n##[endgroup]\nblack....................................................................Failed\n- hook id: black\n- files were modified by this hook\n##[error]Process completed with exit code 1.\n"}], "diff": "diff --git a/tests/fixtures/proxy/raw.githubusercontent.com/octocat/integration/1.0.0/README.md b/tests/fixtures/proxy/raw.githubusercontent.com/octocat/integration/1.0.0/README.md\nindex 547ce4ac..530ac586 100644\n--- a/tests/fixtures/proxy/raw.githubusercontent.com/octocat/integration/1.0.0/README.md\n+++ b/tests/fixtures/proxy/raw.githubusercontent.com/octocat/integration/1.0.0/README.md\n@@ -1 +1 @@\n-## Example readme file\n\\ No newline at end of file\n+## Example readme file (1.0.0)\n\\ No newline at end of file\ndiff --git a/tests/fixtures/proxy/raw.githubusercontent.com/octocat/integration/2.0.0/README.md b/tests/fixtures/proxy/raw.githubusercontent.com/octocat/integration/2.0.0/README.md\nindex 547ce4ac..67d48bfd 100644\n--- a/tests/fixtures/proxy/raw.githubusercontent.com/octocat/integration/2.0.0/README.md\n+++ b/tests/fixtures/proxy/raw.githubusercontent.com/octocat/integration/2.0.0/README.md\n@@ -1 +1 @@\n-## Example readme file\n\\ No newline at end of file\n+## Example readme file (2.0.0)\n\\ No newline at end of file\ndiff --git a/tests/repositories/test_get_documentation.py b/tests/repositories/test_get_documentation.py\nindex e289d295..0b3bcbb6 100644\n--- a/tests/repositories/test_get_documentation.py\n+++ b/tests/repositories/test_get_documentation.py\n@@ -1,19 +1,27 @@\n-\n from typing import Any\n+\n import pytest\n+\n from custom_components.hacs.base import HacsBase\n from custom_components.hacs.repositories.base import HacsRepository\n \n from tests.common import client_session_proxy\n \n \n-\n-@pytest.mark.parametrize(\"data,result\", [\n- ({\"installed\": True, \"installed_version\": \"1.0.0\"}, \"Example readme file\"),\n- ({\"installed\": False, \"last_version\": \"2.0.0\"}, \"Example readme file\")\n-])\n+@pytest.mark.parametrize(\n+ \"data,result\",\n+ [\n+ ({\"installed\": True, \"installed_version\": \"1.0.0\"}, \"Example readme file (1.0.0)\"),\n+ (\n+ {\"installed\": True, \"installed_version\": \"1.0.0\", \"last_version\": \"2.0.0\"},\n+ \"Example readme file (1.0.0)\",\n+ ),\n+ ({\"installed\": False, \"last_version\": \"2.0.0\"}, \"Example readme file (2.0.0)\"),\n+ ({\"installed\": False, \"last_version\": \"99.99.99\"}, None),\n+ ],\n+)\n @pytest.mark.asyncio\n-async def test_validate_repository(hacs: HacsBase, data: dict[str, Any], result: str):\n+async def test_validate_repository(hacs: HacsBase, data: dict[str, Any], result: str | None):\n repository = HacsRepository(hacs=hacs)\n repository.data.full_name = \"octocat/integration\"\n for key, value in data.items():\n@@ -22,4 +30,7 @@ async def test_validate_repository(hacs: HacsBase, data: dict[str, Any], result:\n hacs.session = await client_session_proxy(hacs.hass)\n docs = await repository.get_documentation(filename=\"README.md\")\n \n- assert result in docs\n+ if result:\n+ assert result in docs\n+ else:\n+ assert result is None\ndiff --git a/tests/repositories/test_get_hacs_json.py b/tests/repositories/test_get_hacs_json.py\nindex 495f346d..a1a5c2eb 100644\n--- a/tests/repositories/test_get_hacs_json.py\n+++ b/tests/repositories/test_get_hacs_json.py\n@@ -1,16 +1,12 @@\n-\n import pytest\n+\n from custom_components.hacs.base import HacsBase\n from custom_components.hacs.repositories.base import HacsRepository\n \n from tests.common import client_session_proxy\n \n \n-\n-@pytest.mark.parametrize(\"version,name\", [\n- (\"1.0.0\", \"Proxy integration\"),\n- (\"99.99.99\", None)\n-])\n+@pytest.mark.parametrize(\"version,name\", [(\"1.0.0\", \"Proxy integration\"), (\"99.99.99\", None)])\n @pytest.mark.asyncio\n async def test_validate_repository(hacs: HacsBase, version: str, name: str | None):\n repository = HacsRepository(hacs=hacs)\n", "difficulty": 2, "changed_files": ["tests/fixtures/proxy/raw.githubusercontent.com/octocat/integration/1.0.0/README.md", "tests/fixtures/proxy/raw.githubusercontent.com/octocat/integration/2.0.0/README.md", "tests/repositories/test_get_documentation.py", "tests/repositories/test_get_hacs_json.py"], "commit_link": "https://github.com/hacs/integration/tree/5fea24b4a3fc4952e83474db5e7dc05af9ec76f6"}