From ae1bd325223cf1d734e01c56d6065cae0befdb4c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Nov 2022 14:01:22 +0000 Subject: [PATCH 1/6] Update pygithub requirement from ~=1.55 to ~=1.57 Updates the requirements on [pygithub](https://github.com/pygithub/pygithub) to permit the latest version. - [Release notes](https://github.com/pygithub/pygithub/releases) - [Changelog](https://github.com/PyGithub/PyGithub/blob/master/doc/changes.rst) - [Commits](https://github.com/pygithub/pygithub/compare/v1.55...v1.57) --- updated-dependencies: - dependency-name: pygithub dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 5f02482..8388c7b 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,6 +2,6 @@ black==22.10.0 packaging==21.3 pre-commit~=2.20 -PyGithub~=1.55 +PyGithub~=1.57 pyupgrade~=3.0 yamllint~=1.28 From a092c04d3b5b1acc72c0494f1c3a06189291a6fc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Dec 2022 14:01:11 +0000 Subject: [PATCH 2/6] Bump dessant/lock-threads from 3 to 4 Bumps [dessant/lock-threads](https://github.com/dessant/lock-threads) from 3 to 4. - [Release notes](https://github.com/dessant/lock-threads/releases) - [Changelog](https://github.com/dessant/lock-threads/blob/master/CHANGELOG.md) - [Commits](https://github.com/dessant/lock-threads/compare/v3...v4) --- updated-dependencies: - dependency-name: dessant/lock-threads dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/issue-lock.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue-lock.yml b/.github/workflows/issue-lock.yml index 174a436..5729d67 100644 --- a/.github/workflows/issue-lock.yml +++ b/.github/workflows/issue-lock.yml @@ -16,7 +16,7 @@ jobs: lock: runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v3 + - uses: dessant/lock-threads@v4 with: github-token: ${{ github.token }} issue-lock-inactive-days: 30 From 30f533463b63cd30febec2310e3eaf617d687012 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Dec 2022 14:02:24 +0000 Subject: [PATCH 3/6] Update pyupgrade requirement from ~=3.0 to ~=3.3 Updates the requirements on [pyupgrade](https://github.com/asottile/pyupgrade) to permit the latest version. - [Release notes](https://github.com/asottile/pyupgrade/releases) - [Commits](https://github.com/asottile/pyupgrade/compare/v3.0.0...v3.3.0) --- updated-dependencies: - dependency-name: pyupgrade dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index 5f02482..11364d5 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -3,5 +3,5 @@ black==22.10.0 packaging==21.3 pre-commit~=2.20 PyGithub~=1.55 -pyupgrade~=3.0 +pyupgrade~=3.3 yamllint~=1.28 From 0ef4f658bdac9dff22730fd7d30861ff04dbfb24 Mon Sep 17 00:00:00 2001 From: Andrey Khrolenok Date: Wed, 8 Feb 2023 19:45:06 +0300 Subject: [PATCH 4/6] Update setup for fix debian virtual environment Python 3.10 bug --- .github/workflows/codeql-analysis.yml | 6 +++--- .pre-commit-config.yaml | 16 ++++++++-------- .vscode/launch.json | 1 - bin/setup | 4 +++- bin/update_requirements | 3 ++- hacs.json | 2 +- setup.cfg | 1 - 7 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3295fe5..4c42c86 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -48,11 +48,11 @@ jobs: # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. # Prefix the list here with "+" to use these queries and those in the config file. - + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs # queries: security-extended,security-and-quality - + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild @@ -61,7 +61,7 @@ jobs: # ℹī¸ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - # If the Autobuild fails above, remove it and uncomment the following three lines. + # If the Autobuild fails above, remove it and uncomment the following three lines. # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. # - run: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f11119..7ad1548 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,20 +7,20 @@ repos: language: script files: ^(custom_components/.+/const\.py|requirements\.txt)$ - repo: https://github.com/asottile/pyupgrade - rev: v2.7.4 + rev: v3.3.1 hooks: - id: pyupgrade - args: [--py37-plus] + args: [ --py37-plus ] - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 23.1.0 hooks: - id: black args: - --safe - --quiet files: ^(custom_components|bin|tests)/.+\.py$ - - repo: https://gitlab.com/pycqa/flake8 - rev: 3.8.1 + - repo: https://github.com/pycqa/flake8.git + rev: 6.0.0 hooks: - id: flake8 additional_dependencies: @@ -28,7 +28,7 @@ repos: - pydocstyle==5.0.2 files: ^(custom_components|bin|tests)/.+\.py$ - repo: https://github.com/PyCQA/bandit - rev: 1.7.0 + rev: 1.7.4 hooks: - id: bandit args: @@ -37,11 +37,11 @@ repos: - --configfile=tests/bandit.yaml files: ^(custom_components|bin|tests)/.+\.py$ - repo: https://github.com/pre-commit/mirrors-isort - rev: v5.6.4 + rev: v5.10.1 hooks: - id: isort - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.5.0 + rev: v4.4.0 hooks: - id: check-executables-have-shebangs stages: [manual] diff --git a/.vscode/launch.json b/.vscode/launch.json index 555a62b..df772bc 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -32,4 +32,3 @@ } ] } - \ No newline at end of file diff --git a/bin/setup b/bin/setup index dcd6c2b..4670f55 100755 --- a/bin/setup +++ b/bin/setup @@ -14,7 +14,9 @@ source ./bin/_common if [ ! -d "venv" ]; then log.info "Initializing the virtual environment..." - ${python} -m venv venv + # For error 'executable `python` not found' run + # rm -Rf ~/.local/share/virtualenv + ${python} -m venv ./venv source ./venv/bin/activate python="${ROOT}/venv/bin/python3" fi diff --git a/bin/update_requirements b/bin/update_requirements index 110099f..5762c1f 100755 --- a/bin/update_requirements +++ b/bin/update_requirements @@ -27,7 +27,8 @@ def get_package(requre: str) -> str: harequire = ["homeassistant"] request = requests.get( - "https://raw.githubusercontent.com/home-assistant/core/dev/requirements.txt" + "https://raw.githubusercontent.com/home-assistant/core/dev/requirements.txt", + timeout=10 ) request = request.text.split("\n") for req in request: diff --git a/hacs.json b/hacs.json index 278a776..258691a 100644 --- a/hacs.json +++ b/hacs.json @@ -1,5 +1,5 @@ { "name": "Integration blueprint", "hacs": "1.6.0", - "homeassistant": "2022.6.0" + "homeassistant": "2022.10.0" } diff --git a/setup.cfg b/setup.cfg index e0298b3..0a2c00c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -54,7 +54,6 @@ known_first_party = custom_components,tests forced_separate = tests [mypy] -python_version = 3.9 ignore_errors = true follow_imports = silent ignore_missing_imports = true From 7b0a26acd241054d59faa29a6442271d038f412a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Feb 2023 16:46:59 +0000 Subject: [PATCH 5/6] Bump mypy from 0.982 to 1.0.0 Bumps [mypy](https://github.com/python/mypy) from 0.982 to 1.0.0. - [Release notes](https://github.com/python/mypy/releases) - [Commits](https://github.com/python/mypy/compare/v0.982...v1.0.0) --- updated-dependencies: - dependency-name: mypy dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements-test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index 6f0e918..e2d8d2b 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -2,7 +2,7 @@ asynctest~=0.13 flake8~=5.0 flake8-docstrings~=1.6 -mypy==0.982 +mypy==1.0.0 pylint~=2.15 pylint-strict-informational==0.1 pytest~=7.1 From 0a8326bed3f3b555eaa30f1af394fe714be79ee1 Mon Sep 17 00:00:00 2001 From: Andrey Khrolenok Date: Wed, 8 Feb 2023 19:53:07 +0300 Subject: [PATCH 6/6] Switch off required test coverage --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 0a2c00c..cfd5ff8 100644 --- a/setup.cfg +++ b/setup.cfg @@ -8,7 +8,7 @@ exclude_lines = raise NotImplemented() if __name__ == '__main__': main() -fail_under = 93 +;fail_under = 93 show_missing = true [tool:pytest]