From 9ef83fcbc2cb2b5c1b314081513c3c99ae14bbf2 Mon Sep 17 00:00:00 2001 From: David Bonnes Date: Sun, 21 Apr 2024 21:43:27 +0100 Subject: [PATCH] minor style fix --- .pre-commit-config.yaml | 7 +++++++ src/evohomeasync2/client.py | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c98f27a6..48747b41 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -51,6 +51,13 @@ repos: args: [-i] exclude: .pre-commit-config.yaml # avoid false +ve + - id: style_1 + name: check for 'as exc:' (should be 'as err:') + entry: ' as exc:' + language: pygrep + args: [-i] + exclude: .pre-commit-config.yaml # avoid false +ve + # - id: private imports # name: check private imports # entry: 'from .* import _.*' diff --git a/src/evohomeasync2/client.py b/src/evohomeasync2/client.py index 67817523..b9436913 100644 --- a/src/evohomeasync2/client.py +++ b/src/evohomeasync2/client.py @@ -299,8 +299,8 @@ def main() -> None: try: cli(obj={}) # default for ctx.obj is None - except click.ClickException as exc: - print(f"Error: {exc}") + except click.ClickException as err: + print(f"Error: {err}") sys.exit(-1)