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)