diff --git a/pyhmmer/plan7.pyx b/pyhmmer/plan7.pyx
index c78060dcb1bcef35b309387ce7ed407225c630d0..11c3c6476a8c82ecbbd67595af613e1f0fd5787c 100644
--- a/pyhmmer/plan7.pyx
+++ b/pyhmmer/plan7.pyx
@@ -7982,9 +7982,9 @@ cdef class TopHits:
         to the `Pipeline`, or the `~pyhmmer.hmmer` function, that created the
         object::
 
-        >>> hits = next(pyhmmer.hmmsearch(thioesterase, proteins))
-        >>> hits.query
-        <HMM alphabet=Alphabet.amino() M=243 name=b'Thioesterase'>
+            >>> hits = next(pyhmmer.hmmsearch(thioesterase, proteins))
+            >>> hits.query is thioesterase
+            True
 
         .. versionadded 0.10.10