From 17296f06946b659ea310282f94da7ff3368acda2 Mon Sep 17 00:00:00 2001 From: Zac Hatfield-Dodds Date: Sun, 24 Mar 2024 02:00:32 -0700 Subject: [PATCH] Another workaround for black --- hypothesis-python/src/hypothesis/extra/_patching.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypothesis-python/src/hypothesis/extra/_patching.py b/hypothesis-python/src/hypothesis/extra/_patching.py index 8f53076d72..d3678e3f9f 100644 --- a/hypothesis-python/src/hypothesis/extra/_patching.py +++ b/hypothesis-python/src/hypothesis/extra/_patching.py @@ -121,7 +121,7 @@ def __call_node_to_example_dec(self, node, via): cst.Module([]).code_for_node(via), mode=black.FileMode(line_length=self.line_length), ) - except ImportError: + except (ImportError, AttributeError): return None # See https://github.com/psf/black/pull/4224 via = cst.parse_expression(pretty.strip()) return cst.Decorator(via)