From b90c33eae76453dc8893bcc9aefd56a725fb9401 Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Mon, 31 Jan 2022 14:24:33 +0000 Subject: [PATCH] Fix test in traceback, remove the no-eval pre-commit hook --- .pre-commit-config.yaml | 1 - tests/test_traceback.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 892dc791..bbae40c8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,7 +21,6 @@ repos: rev: v1.9.0 hooks: - id: python-check-mock-methods - - id: python-no-eval - id: python-no-log-warn - id: python-use-type-annotations - id: rst-directive-colons diff --git a/tests/test_traceback.py b/tests/test_traceback.py index e3342ca1..8bcc8922 100644 --- a/tests/test_traceback.py +++ b/tests/test_traceback.py @@ -110,7 +110,7 @@ def test_syntax_error(): console = Console(width=100, file=io.StringIO()) try: # raises SyntaxError: unexpected EOF while parsing - compile("(2+2") + eval("(2+2") except Exception: console.print_exception() exception_text = console.file.getvalue()