From 7bd3fdbde7da71674dc18e3d8e4bccfa59d83f09 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 4 Aug 2021 22:50:26 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20MAINTAIN:=20update=20pre-commit?= =?UTF-8?q?=20version=20and=20hooks=20(#130)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [pre-commit.ci] pre-commit autoupdate updates: - git://github.com/pre-commit/pre-commit-hooks: v2.2.3 → v4.0.1 - [github.com/mgedmin/check-manifest: 0.39 → 0.46](https://github.com/mgedmin/check-manifest/compare/0.39...0.46) - [github.com/psf/black: stable → 21.7b0](https://github.com/psf/black/compare/stable...21.7b0) - [github.com/PyCQA/pylint: pylint-2.4.2 → v2.9.5](https://github.com/PyCQA/pylint/compare/pylint-2.4.2...v2.9.5) * Change exception raising to use 'from' syntax * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Bump pre-commit version Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: foster999 --- .pre-commit-config.yaml | 8 ++++---- setup.py | 2 +- sphinx_tabs/tabs.py | 6 ++++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 98a36ca..04e8cdf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ repos: - repo: git://github.com/pre-commit/pre-commit-hooks - rev: v2.2.3 + rev: v4.0.1 hooks: - id: check-json - id: check-yaml @@ -11,17 +11,17 @@ repos: ".xml" - repo: https://github.com/mgedmin/check-manifest - rev: "0.39" + rev: "0.46" hooks: - id: check-manifest - repo: https://github.com/psf/black - rev: stable + rev: 21.7b0 hooks: - id: black - repo: https://github.com/PyCQA/pylint - rev: pylint-2.4.2 + rev: v2.9.5 hooks: - id: pylint args: diff --git a/setup.py b/setup.py index a254a2a..d5af1f0 100755 --- a/setup.py +++ b/setup.py @@ -37,7 +37,7 @@ def get_version(): "bs4", "rinohtype", ], - "code_style": ["pre-commit==2.6"], + "code_style": ["pre-commit==2.13.0"], }, classifiers=[ "Development Status :: 5 - Production/Stable", diff --git a/sphinx_tabs/tabs.py b/sphinx_tabs/tabs.py index 93742ca..3afa87f 100644 --- a/sphinx_tabs/tabs.py +++ b/sphinx_tabs/tabs.py @@ -250,8 +250,10 @@ def run(self): else: try: tab_name = LEXER_MAP[self.arguments[0]] - except: - raise ValueError("Lexer not implemented: {}".format(self.arguments[0])) + except KeyError as invalid_lexer_error: + raise ValueError( + "Lexer not implemented: {}".format(self.arguments[0]) + ) from invalid_lexer_error self.tab_classes.add("code-tab")