From 2650441013a587911d603e3e715e63ae7b808484 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 31 Aug 2022 17:01:36 +1200 Subject: [PATCH] Bump pylint from 2.14.5 to 2.15.0 (#3746) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> --- esphome/components/font/__init__.py | 4 ++-- esphome/components/shelly_dimmer/light.py | 2 +- esphome/dashboard/dashboard.py | 4 +++- requirements_test.txt | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/esphome/components/font/__init__.py b/esphome/components/font/__init__.py index ced433dc5a..aa165ebaa5 100644 --- a/esphome/components/font/__init__.py +++ b/esphome/components/font/__init__.py @@ -146,7 +146,7 @@ def download_gfonts(value): if path.is_file(): return value try: - req = requests.get(url) + req = requests.get(url, timeout=30) req.raise_for_status() except requests.exceptions.RequestException as e: raise cv.Invalid( @@ -162,7 +162,7 @@ def download_gfonts(value): ttf_url = match.group(1) try: - req = requests.get(ttf_url) + req = requests.get(ttf_url, timeout=30) req.raise_for_status() except requests.exceptions.RequestException as e: raise cv.Invalid(f"Could not download ttf file for {name} ({ttf_url}): {e}") diff --git a/esphome/components/shelly_dimmer/light.py b/esphome/components/shelly_dimmer/light.py index 003498c090..3978d37c0b 100644 --- a/esphome/components/shelly_dimmer/light.py +++ b/esphome/components/shelly_dimmer/light.py @@ -73,7 +73,7 @@ def get_firmware(value): def dl(url): try: - req = requests.get(url) + req = requests.get(url, timeout=30) req.raise_for_status() except requests.exceptions.RequestException as e: raise cv.Invalid(f"Could not download firmware file ({url}): {e}") diff --git a/esphome/dashboard/dashboard.py b/esphome/dashboard/dashboard.py index ca2767639d..e7a17cba4c 100644 --- a/esphome/dashboard/dashboard.py +++ b/esphome/dashboard/dashboard.py @@ -823,7 +823,9 @@ class LoginHandler(BaseHandler): "password": self.get_argument("password", ""), } try: - req = requests.post("http://supervisor/auth", headers=headers, data=data) + req = requests.post( + "http://supervisor/auth", headers=headers, data=data, timeout=30 + ) if req.status_code == 200: self.set_secure_cookie("authenticated", cookie_authenticated_yes) self.redirect("/") diff --git a/requirements_test.txt b/requirements_test.txt index ed48818276..8ae7563642 100644 --- a/requirements_test.txt +++ b/requirements_test.txt @@ -1,4 +1,4 @@ -pylint==2.14.5 +pylint==2.15.0 flake8==5.0.4 black==22.6.0 # also change in .pre-commit-config.yaml when updating pyupgrade==2.37.3 # also change in .pre-commit-config.yaml when updating