Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 02a6a8a

Browse files
committed
10668: fixed representation of the category of endsets
1 parent 23639a9 commit 02a6a8a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/sage/categories/category_with_axiom.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -2226,6 +2226,12 @@ def _repr_object_names_static(category, axioms):
22262226
22272227
The logic here is shared between :meth:`_repr_object_names`
22282228
and :meth:`.category.JoinCategory._repr_object_names`
2229+
2230+
TESTS::
2231+
2232+
sage: from sage.categories.homsets import Homsets
2233+
sage: CategoryWithAxiom._repr_object_names_static(Homsets(), ["Endset"])
2234+
'endsets'
22292235
"""
22302236
axioms = canonicalize_axioms(all_axioms,axioms)
22312237
base_category = category._without_axioms(named=True)
@@ -2246,7 +2252,8 @@ def _repr_object_names_static(category, axioms):
22462252
elif axiom == "Connected" and "graded " in result:
22472253
result = result.replace("graded ", "graded connected ", 1)
22482254
elif axiom == "Endset" and "homsets" in result:
2249-
result = result.replace("homsets ", "endsets ", 1)
2255+
# Without the space at the end to handle Homsets().Endset()
2256+
result = result.replace("homsets", "endsets", 1)
22502257
else:
22512258
result = uncamelcase(axiom) + " " + result
22522259
return result

0 commit comments

Comments
 (0)