From 358c363077d1c9655b998f67deb3a0f88f2b1661 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Tue, 12 Mar 2024 16:26:34 +0100 Subject: [PATCH 1/4] Don't test automatically on `main` --- .github/workflows/validate_python.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/validate_python.yml b/.github/workflows/validate_python.yml index 0b405d6..6267255 100644 --- a/.github/workflows/validate_python.yml +++ b/.github/workflows/validate_python.yml @@ -4,9 +4,15 @@ name: Validate Python (flake8) # yamllint disable-line rule:truthy on: push: + branches: + - dev + - beta paths: - '*.py' pull_request: + branches: + - dev + - beta paths: - '*.py' workflow_dispatch: From e3fb149b585cb44c185c1d8acbe0504d94e574f3 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Tue, 12 Mar 2024 16:30:54 +0100 Subject: [PATCH 2/4] Use newer python --- .github/workflows/validate_python.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/validate_python.yml b/.github/workflows/validate_python.yml index 6267255..896a2a8 100644 --- a/.github/workflows/validate_python.yml +++ b/.github/workflows/validate_python.yml @@ -4,15 +4,9 @@ name: Validate Python (flake8) # yamllint disable-line rule:truthy on: push: - branches: - - dev - - beta paths: - '*.py' pull_request: - branches: - - dev - - beta paths: - '*.py' workflow_dispatch: @@ -24,7 +18,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v1 with: - python-version: 3.7.4 + python-version: 3.7.17 architecture: x64 - name: Checkout PyTorch uses: actions/checkout@main From 5288cf68b6629143e3d26c98f2a53fc691351985 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Tue, 12 Mar 2024 16:38:51 +0100 Subject: [PATCH 3/4] Lint --- components/nspanel_ha_blueprint/__init__.py | 1 - components/nspanel_ha_blueprint_upload_tft/__init__.py | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/components/nspanel_ha_blueprint/__init__.py b/components/nspanel_ha_blueprint/__init__.py index 4753134..37ac8c2 100644 --- a/components/nspanel_ha_blueprint/__init__.py +++ b/components/nspanel_ha_blueprint/__init__.py @@ -12,7 +12,6 @@ CONFIG_SCHEMA = cv.All( ) @coroutine_with_priority(1.0) - async def to_code(config): cg.add_define("USE_NSPANEL_HA_BLUEPRINT") cg.add_global(nspanel_ha_blueprint_ns.using) diff --git a/components/nspanel_ha_blueprint_upload_tft/__init__.py b/components/nspanel_ha_blueprint_upload_tft/__init__.py index e521bf0..72a8c19 100644 --- a/components/nspanel_ha_blueprint_upload_tft/__init__.py +++ b/components/nspanel_ha_blueprint_upload_tft/__init__.py @@ -5,14 +5,16 @@ from esphome.core import coroutine_with_priority CODEOWNERS = ["@edwardtfn"] -nspanel_ha_blueprint_upload_tft_ns = cg.esphome_ns.namespace('nspanel_ha_blueprint_upload_tft') +nspanel_ha_blueprint_upload_tft_ns = cg.esphome_ns.namespace( + 'nspanel_ha_blueprint_upload_tft' +) CONFIG_SCHEMA = cv.All( cv.Schema({}), ) -@coroutine_with_priority(1.0) +@coroutine_with_priority(1.0) async def to_code(config): cg.add_define("USE_NSPANEL_HA_BLUEPRINT_UPLOAD_TFT") cg.add_global(nspanel_ha_blueprint_upload_tft_ns.using) From 6fd55ce65d75f3da7330baa1dc59eeea233481a4 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Tue, 12 Mar 2024 16:41:15 +0100 Subject: [PATCH 4/4] Lint --- components/nspanel_ha_blueprint/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/components/nspanel_ha_blueprint/__init__.py b/components/nspanel_ha_blueprint/__init__.py index 37ac8c2..9ba0e44 100644 --- a/components/nspanel_ha_blueprint/__init__.py +++ b/components/nspanel_ha_blueprint/__init__.py @@ -11,6 +11,7 @@ CONFIG_SCHEMA = cv.All( cv.Schema({}), ) + @coroutine_with_priority(1.0) async def to_code(config): cg.add_define("USE_NSPANEL_HA_BLUEPRINT")