Skip to content

Commit 7275540

Browse files
committed
Fix pytest on py310 rc
1 parent 75f483c commit 7275540

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hypothesis-python/src/hypothesis/internal/reflection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ def get_pretty_function_description(f):
381381
# their module as __self__. This might include c-extensions generally?
382382
if not (self is None or inspect.isclass(self) or inspect.ismodule(self)):
383383
return f"{self!r}.{name}"
384-
elif getattr(dict, name, object()) is f:
384+
elif isinstance(name, str) and getattr(dict, name, object()) is f:
385385
# special case for keys/values views in from_type() / ghostwriter output
386386
return f"dict.{name}"
387387
return name

0 commit comments

Comments
 (0)