Skip to content

Commit

Permalink
Trac #34168: Fix docstring markup in sage/categories
Browse files Browse the repository at this point in the history
Part of #34157:
{{{
sage/categories/unique_factorization_domains.py:74:1: RST215 Inline
interpreted text or phrase reference start-string without end-string.
sage/categories/unique_factorization_domains.py:223:1: RST303 Unknown
directive type "seealso".
sage/categories/unique_factorization_domains.py:273:1: RST303 Unknown
directive type "seealso".
sage/categories/fields.py:76:1: RST215 Inline interpreted text or phrase
reference start-string without end-string.
sage/categories/category.py:1394:1: RST303 Unknown directive type
"todo".
sage/categories/finite_coxeter_groups.py:204:1: RST303 Unknown directive
type "todo".
sage/categories/finite_coxeter_groups.py:466:1: RST303 Unknown directive
type "todo".
sage/categories/rings.py:388:1: RST215 Inline interpreted text or phrase
reference start-string without end-string.
sage/categories/affine_weyl_groups.py:21:1: RST303 Unknown directive
type "todo".
sage/categories/integral_domains.py:58:1: RST215 Inline interpreted text
or phrase reference start-string without end-string.
sage/categories/facade_sets.py:189:1: RST205 Explicit markup ends
without a blank line; unexpected unindent.
sage/categories/hecke_modules.py:111:1: RST215 Inline interpreted text
or phrase reference start-string without end-string.
sage/categories/category_with_axiom.py:752:1: RST201 Block quote ends
without a blank line; unexpected unindent.
}}}

URL: https://trac.sagemath.org/34168
Reported by: klee
Ticket author(s): John Palmieri
Reviewer(s): Matthias Koeppe
  • Loading branch information
Release Manager committed Jul 25, 2022
2 parents e9be172 + 80d7f8f commit 4142099
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/sage/categories/affine_weyl_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AffineWeylGroups(Category_singleton):
"""
The category of affine Weyl groups
.. todo:: add a description of this category
.. TODO:: add a description of this category
.. SEEALSO::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ def _test_category_graph(self, **options):
method resolution order of the parent and element
classes. This method checks this.
.. todo:: currently, this won't work for hom categories.
.. TODO:: currently, this won't work for hom categories.
EXAMPLES::
Expand Down
6 changes: 4 additions & 2 deletions src/sage/categories/facade_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,10 @@ def __contains__(self, element):
Returns whether ``element`` is in one of the parents
``self`` is a facade for.
.. warning:: this default implementation is currently
overridden by :meth:`Parent.__contains__`.
.. warning::
this default implementation is currently
overridden by :meth:`Parent.__contains__`.
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __contains__(self, x):
This implementation will not be needed anymore once every
field in Sage will be properly declared in the category
:class:`Fields`().
:class:`Fields() <Fields>`.
Caveat: this should eventually be fixed::
Expand Down
4 changes: 2 additions & 2 deletions src/sage/categories/finite_coxeter_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def bruhat_poset(self, facade=False):
sage: [len(WeylGroup(["A", n]).bruhat_poset().cover_relations()) for n in [1,2,3]]
[1, 8, 58]
.. todo::
.. TODO::
- Use the symmetric group in the examples (for nicer
output), and print the edges for a stronger test.
Expand Down Expand Up @@ -464,7 +464,7 @@ def weak_poset(self, side="right", facade=False):
sage: [len(WeylGroup(["A", n]).weak_poset(side = "left" ).cover_relations()) for n in [1,2,3]]
[1, 6, 36]
.. todo::
.. TODO::
- Use the symmetric group in the examples (for nicer
output), and print the edges for a stronger test.
Expand Down
4 changes: 2 additions & 2 deletions src/sage/categories/hecke_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ def _Hom_(self, Y, category):
INPUT:
- ``Y`` -- an Hecke module
- ``category`` -- a subcategory of :class:`HeckeModules`() or None
- ``category`` -- a subcategory of :class:`HeckeModules()
<HeckeModules>` or ``None``
The sole purpose of this method is to construct the homset
as a :class:`~sage.modular.hecke.homspace.HeckeModuleHomspace`. If
Expand Down Expand Up @@ -143,7 +144,6 @@ def _Hom_(self, Y, category):
Traceback (most recent call last):
...
TypeError: Category of Hecke modules over Finite Field of size 5 is not a subcategory of Category of Hecke modules over Rational Field
"""
# TODO: double check that it's the correct HeckeModules category below:
if category is not None and not category.is_subcategory(HeckeModules(self.base_ring())):
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/integral_domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __contains__(self, x):
This implementation will not be needed anymore once every
field in Sage will be properly declared in the category
:class:`IntegralDomains`().
:class:`IntegralDomains() <IntegralDomains>`.
"""
try:
return self._contains_helper(x) or x.is_integral_domain()
Expand Down
6 changes: 3 additions & 3 deletions src/sage/categories/rings.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,12 +386,13 @@ def _Hom_(self, Y, category):
INPUT:
- ``Y`` -- a ring
- ``category`` -- a subcategory of :class:`Rings`() or None
- ``category`` -- a subcategory of :class:`Rings()
<Rings>` or ``None``
The sole purpose of this method is to construct the homset
as a :class:`~sage.rings.homset.RingHomset`. If
``category`` is specified and is not a subcategory of
:class:`Rings`, a ``TypeError`` is raised instead
:class:`Rings() <Rings>`, a ``TypeError`` is raised instead
This method is not meant to be called directly. Please use
:func:`sage.categories.homset.Hom` instead.
Expand All @@ -412,7 +413,6 @@ def _Hom_(self, Y, category):
<class 'sage.rings.number_field.homset.CyclotomicFieldHomset_with_category'>
sage: TestSuite(Hom(QQ, QQ, category = Rings())).run() # indirect doctest
"""
if category is not None and not category.is_subcategory(Rings()):
raise TypeError("%s is not a subcategory of Rings()"%category)
Expand Down
6 changes: 3 additions & 3 deletions src/sage/categories/unique_factorization_domains.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __contains__(self, x):
This implementation will not be needed anymore once every
field in Sage will be properly declared in the category
:class:`UniqueFactorizationDomains`().
:class:`UniqueFactorizationDomains() <UniqueFactorizationDomains>`.
"""
try:
return self._contains_helper(x) or x.is_unique_factorization_domain()
Expand Down Expand Up @@ -221,7 +221,7 @@ def radical(self, *args, **kwds):
This default implementation calls ``squarefree_decomposition`` if
available, and ``factor`` otherwise.
.. seealso:: :meth:`squarefree_part`
.. SEEALSO:: :meth:`squarefree_part`
EXAMPLES::
Expand Down Expand Up @@ -271,7 +271,7 @@ def squarefree_part(self):
This default implementation calls ``squarefree_decomposition``.
.. seealso:: :meth:`radical`
.. SEEALSO:: :meth:`radical`
EXAMPLES::
Expand Down

0 comments on commit 4142099

Please sign in to comment.