diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 71a2de2d5..413391d01 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.8 +FROM mcr.microsoft.com/vscode/devcontainers/python:0-3.9 ENV DEBIAN_FRONTEND=noninteractive diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml index 9c450163f..1f2e48b67 100644 --- a/.github/workflows/builder.yml +++ b/.github/workflows/builder.yml @@ -35,7 +35,7 @@ on: env: BUILD_NAME: supervisor BUILD_TYPE: supervisor - WHEELS_TAG: 3.8-alpine3.13 + WHEELS_TAG: 3.9-alpine3.13 jobs: init: @@ -71,7 +71,7 @@ jobs: - name: Check if requirements files changed id: requirements run: | - if [[ "${{ steps.changed_files.outputs.all }}" =~ requirements.txt ]]; then + if [[ "${{ steps.changed_files.outputs.all }}" =~ (requirements.txt|build.json) ]]; then echo "::set-output name=changed::true" fi diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 41b23ce4d..6594b4fd6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,7 +8,7 @@ on: pull_request: ~ env: - DEFAULT_PYTHON: 3.8 + DEFAULT_PYTHON: 3.9 PRE_COMMIT_HOME: ~/.cache/pre-commit jobs: @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8] + python-version: [3.9] name: Prepare Python ${{ matrix.python-version }} dependencies steps: - name: Check out code from GitHub @@ -343,7 +343,7 @@ jobs: needs: prepare strategy: matrix: - python-version: [3.8] + python-version: [3.9] name: Run tests Python ${{ matrix.python-version }} steps: - name: Check out code from GitHub diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b7616941e..eacc7c8de 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/psf/black - rev: 21.5b0 + rev: 21.5b1 hooks: - id: black args: diff --git a/build.json b/build.json index 9f433e1ae..03b35dc8f 100644 --- a/build.json +++ b/build.json @@ -2,11 +2,11 @@ "image": "homeassistant/{arch}-hassio-supervisor", "shadow_repository": "ghcr.io/home-assistant", "build_from": { - "aarch64": "ghcr.io/home-assistant/aarch64-base-python:3.8-alpine3.13", - "armhf": "ghcr.io/home-assistant/armhf-base-python:3.8-alpine3.13", - "armv7": "ghcr.io/home-assistant/armv7-base-python:3.8-alpine3.13", - "amd64": "ghcr.io/home-assistant/amd64-base-python:3.8-alpine3.13", - "i386": "ghcr.io/home-assistant/i386-base-python:3.8-alpine3.13" + "aarch64": "ghcr.io/home-assistant/aarch64-base-python:3.9-alpine3.13", + "armhf": "ghcr.io/home-assistant/armhf-base-python:3.9-alpine3.13", + "armv7": "ghcr.io/home-assistant/armv7-base-python:3.9-alpine3.13", + "amd64": "ghcr.io/home-assistant/amd64-base-python:3.9-alpine3.13", + "i386": "ghcr.io/home-assistant/i386-base-python:3.9-alpine3.13" }, "args": { "VCN_VERSION": "0.9.4" diff --git a/pylintrc b/pylintrc index 2aeb49278..3c3e6b39d 100644 --- a/pylintrc +++ b/pylintrc @@ -37,6 +37,7 @@ disable= too-many-return-statements, too-many-statements, unused-argument, + consider-using-with [EXCEPTIONS] overgeneral-exceptions=Exception diff --git a/requirements_tests.txt b/requirements_tests.txt index f1eac6bd0..53a33a993 100644 --- a/requirements_tests.txt +++ b/requirements_tests.txt @@ -5,7 +5,7 @@ flake8-docstrings==1.6.0 flake8==3.9.2 pre-commit==2.12.1 pydocstyle==6.0.0 -pylint==2.7.4 +pylint==2.8.2 pytest-aiohttp==0.3.0 pytest-asyncio==0.12.0 # NB!: Versions over 0.12.0 breaks pytest-aiohttp (https://github.com/aio-libs/pytest-aiohttp/issues/16) pytest-cov==2.11.1 diff --git a/supervisor/bootstrap.py b/supervisor/bootstrap.py index be10aa5aa..29155f648 100644 --- a/supervisor/bootstrap.py +++ b/supervisor/bootstrap.py @@ -303,6 +303,7 @@ def supervisor_debugger(coresys: CoreSys) -> None: def setup_diagnostics(coresys: CoreSys) -> None: """Sentry diagnostic backend.""" _LOGGER.info("Initializing Supervisor Sentry") + # pylint: disable=abstract-class-instantiated sentry_sdk.init( dsn="https://9c6ea70f49234442b4746e447b24747e@o427061.ingest.sentry.io/5370612", before_send=lambda event, hint: filter_data(coresys, event, hint),