From f7938c940c10b7a522d8c2af715381209a5d53cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Thu, 8 Jun 2023 22:53:43 +0300 Subject: [PATCH] Upgrade ruff to 0.0.272 (#94290) --- .pre-commit-config.yaml | 2 +- homeassistant/components/esphome/bluetooth/client.py | 2 +- pyproject.toml | 5 ++--- requirements_test_pre_commit.txt | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8e8fef97697..461543ba141 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.262 + rev: v0.0.272 hooks: - id: ruff args: diff --git a/homeassistant/components/esphome/bluetooth/client.py b/homeassistant/components/esphome/bluetooth/client.py index 708d79e0eec..d452ab8764a 100644 --- a/homeassistant/components/esphome/bluetooth/client.py +++ b/homeassistant/components/esphome/bluetooth/client.py @@ -233,7 +233,7 @@ class ESPHomeClient(BaseBleakClient): ) -> bool: """Connect to a specified Peripheral. - Keyword Args: + **kwargs: timeout (float): Timeout for required ``BleakScanner.find_device_by_address`` call. Defaults to 10.0. diff --git a/pyproject.toml b/pyproject.toml index 7e8318c6e69..032bc6e14a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -273,6 +273,8 @@ ignore = [ "D407", # Section name underlining "E501", # line too long "E731", # do not assign a lambda expression, use a def + "UP006", # keep type annotation style as is + "UP007", # keep type annotation style as is # Ignored due to performance: https://github.com/charliermarsh/ruff/issues/2923 "UP038", # Use `X | Y` in `isinstance` call instead of `(X, Y)` ] @@ -289,9 +291,6 @@ voluptuous = "vol" [tool.ruff.flake8-pytest-style] fixture-parentheses = false -[tool.ruff.pyupgrade] -keep-runtime-typing = true - [tool.ruff.per-file-ignores] # Allow for main entry & scripts to write to stdout diff --git a/requirements_test_pre_commit.txt b/requirements_test_pre_commit.txt index 9954e97da97..abe388df553 100644 --- a/requirements_test_pre_commit.txt +++ b/requirements_test_pre_commit.txt @@ -4,5 +4,5 @@ bandit==1.7.4 black==23.3.0 codespell==2.2.2 isort==5.12.0 -ruff==0.0.262 +ruff==0.0.272 yamllint==1.28.0