File size: 5,228 Bytes
8f0a8fd
1
{"language": "Python", "id": 57, "repo_owner": "hacs", "repo_name": "integration", "head_branch": "more-proxy-tests", "workflow_name": "Lint", "workflow_filename": "lint.yaml", "workflow_path": ".github/workflows/lint.yaml", "contributor": "hacs", "sha_fail": "5b9b7a0f0f73cc0257f1b41b4904dc9056e9baa1", "sha_success": "04d2ec72235a322abe7140afa8cbbd65fa35090a", "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/[email protected]\n\n      - name: \ud83d\udee0\ufe0f Set up Python\n        uses: actions/[email protected]\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/[email protected]\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.7/x64\n  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.7/x64/lib/pkgconfig\n  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.7/x64\n  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.7/x64\n  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.7/x64\n  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.7/x64/lib\n##[endgroup]\npyupgrade................................................................Failed\n- hook id: pyupgrade\n- exit code: 1\n- files were modified by this hook\n\nRewriting tests/common.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.7/x64\n  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.7/x64/lib/pkgconfig\n  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.7/x64\n  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.7/x64\n  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.7/x64\n  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.7/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/common.py b/tests/common.py\nindex 190a2fba..ea30646a 100644\n--- a/tests/common.py\n+++ b/tests/common.py\n@@ -13,7 +13,13 @@ from unittest.mock import AsyncMock, Mock, patch\n from aiohttp import ClientSession, ClientWebSocketResponse\n from aiohttp.typedefs import StrOrURL\n from awesomeversion import AwesomeVersion\n-from homeassistant import auth, bootstrap, config_entries, core as ha, config as ha_config\n+from homeassistant import (\n+    auth,\n+    bootstrap,\n+    config as ha_config,\n+    config_entries,\n+    core as ha,\n+)\n from homeassistant.auth import auth_store, models as auth_models\n from homeassistant.const import (\n     EVENT_HOMEASSISTANT_CLOSE,\n@@ -49,13 +55,13 @@ TOKEN = \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\n INSTANCES = []\n REQUEST_CONTEXT: ContextVar[pytest.FixtureRequest] = ContextVar(\"request_context\", default=None)\n \n-IGNORED_BASE_FILES = set([\n-        \"/config/automations.yaml\",\n-        \"/config/configuration.yaml\",\n-        \"/config/scenes.yaml\",\n-        \"/config/scripts.yaml\",\n-        \"/config/secrets.yaml\",\n-    ])\n+IGNORED_BASE_FILES = {\n+    \"/config/automations.yaml\",\n+    \"/config/configuration.yaml\",\n+    \"/config/scenes.yaml\",\n+    \"/config/scripts.yaml\",\n+    \"/config/secrets.yaml\",\n+}\n \n \n def safe_json_dumps(data: dict | list) -> str:\n", "difficulty": 3, "changed_files": ["tests/common.py"], "commit_link": "https://github.com/hacs/integration/tree/5b9b7a0f0f73cc0257f1b41b4904dc9056e9baa1"}