From 72755405c62f37f5438860bc0daaa0e019f8856e Mon Sep 17 00:00:00 2001 From: Zac-HD Date: Sun, 15 Aug 2021 14:36:59 +1000 Subject: [PATCH] Fix pytest on py310 rc --- hypothesis-python/src/hypothesis/internal/reflection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypothesis-python/src/hypothesis/internal/reflection.py b/hypothesis-python/src/hypothesis/internal/reflection.py index b9db01e5bc..72b46c85a9 100644 --- a/hypothesis-python/src/hypothesis/internal/reflection.py +++ b/hypothesis-python/src/hypothesis/internal/reflection.py @@ -381,7 +381,7 @@ def get_pretty_function_description(f): # their module as __self__. This might include c-extensions generally? if not (self is None or inspect.isclass(self) or inspect.ismodule(self)): return f"{self!r}.{name}" - elif getattr(dict, name, object()) is f: + elif isinstance(name, str) and getattr(dict, name, object()) is f: # special case for keys/values views in from_type() / ghostwriter output return f"dict.{name}" return name