Skip to content

Commit

Permalink
Docstring edits
Browse files Browse the repository at this point in the history
Docstring beginnings: "Returns" to "Return" and addition of dots.
  • Loading branch information
gmou3 committed Jun 10, 2024
1 parent 6922a4c commit 0716b41
Show file tree
Hide file tree
Showing 161 changed files with 658 additions and 758 deletions.
2 changes: 1 addition & 1 deletion src/sage/algebras/commutative_dga.py
Original file line number Diff line number Diff line change
Expand Up @@ -2084,7 +2084,7 @@ def __classcall__(cls, A, differential):

def __init__(self, A, differential):
"""
Initialize ``self``
Initialize ``self``.
INPUT:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ cdef class FiniteDimensionalAlgebraElement(AlgebraElement):

def __getitem__(self, m):
"""
Return the `m`-th coefficient of ``self``
Return the `m`-th coefficient of ``self``.
EXAMPLES::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __init__(self, A, gens=None, given_by_matrix=False):

def _richcmp_(self, other, op):
r"""
Comparisons
Comparisons.
TESTS::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/fusion_rings/fusion_double.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def Nk_ij(self, i, j, k, use_characters=False):
@cached_method
def field(self):
"""
Returns a cyclotomic field large enough to contain the values
Return a cyclotomic field large enough to contain the values
of R-matrices and twists that can arise for this fusion ring.
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/fusion_rings/poly_tup_engine.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ cpdef list get_variables_degrees(list eqns, int nvars):

cpdef list variables(tuple eq_tup):
"""
Return indices of all variables appearing in eq_tup
Return indices of all variables appearing in eq_tup.
EXAMPLES::
Expand Down
4 changes: 2 additions & 2 deletions src/sage/algebras/hecke_algebras/cubic_hecke_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ def check_base_ring_embedding(base_ring_embedding):
############################################################################
def _repr_(self):
r"""
Return a string representation
Return a string representation.
OUTPUT: string describing ``self``
Expand Down Expand Up @@ -1575,7 +1575,7 @@ def product_on_basis(self, g1, g2):
############################################################################
def _basis_tietze(self):
r"""
Return the complete finite sub basis as list of Tietze tuples
Return the complete finite sub basis as list of Tietze tuples.
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/lie_algebras/nilpotent_lie_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def __classcall_private__(cls, R, r, s, names=None, naming=None, category=None,

def __init__(self, R, r, s, names, naming, category, **kwds):
r"""
Initialize ``self``
Initialize ``self``.
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/lie_algebras/subalgebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ def leading_monomials(self):

def from_vector(self, v, order=None, coerce=False):
r"""
Return the element of ``self`` corresponding to the vector ``v``
Return the element of ``self`` corresponding to the vector ``v``.
INPUT:
Expand Down
12 changes: 6 additions & 6 deletions src/sage/algebras/steenrod/steenrod_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ def one_basis(self):

def product_on_basis(self, t1, t2):
"""
The product of two basis elements of this algebra
The product of two basis elements of this algebra.
INPUT:
Expand Down Expand Up @@ -1228,7 +1228,7 @@ def product_on_basis(self, t1, t2):

def coproduct_on_basis(self, t, algorithm=None):
r"""
The coproduct of a basis element of this algebra
The coproduct of a basis element of this algebra.
INPUT:
Expand Down Expand Up @@ -1435,7 +1435,7 @@ def coprod(x):

def antipode_on_basis(self, t):
r"""
The antipode of a basis element of this algebra
The antipode of a basis element of this algebra.
INPUT:
Expand Down Expand Up @@ -1716,7 +1716,7 @@ def _milnor_on_basis(self, t):
@lazy_attribute
def milnor(self):
"""
Convert an element of this algebra to the Milnor basis
Convert an element of this algebra to the Milnor basis.
INPUT:
Expand Down Expand Up @@ -1820,7 +1820,7 @@ def _change_basis_on_basis(self, t, basis='milnor'):

def _change_basis(self, x, basis='milnor'):
"""
Convert an element of this algebra to the specified basis
Convert an element of this algebra to the specified basis.
INPUT:
Expand Down Expand Up @@ -3802,7 +3802,7 @@ def Sq(self, *nums):

def SteenrodAlgebra(p=2, basis='milnor', generic='auto', **kwds):
r"""
The mod `p` Steenrod algebra
The mod `p` Steenrod algebra.
INPUT:
Expand Down
10 changes: 5 additions & 5 deletions src/sage/arith/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def is_prime(n) -> bool:

def is_pseudoprime(n):
r"""
Test whether ``n`` is a pseudo-prime
Test whether ``n`` is a pseudo-prime.
The result is *NOT* proven correct - *this is a pseudo-primality test!*.
Expand Down Expand Up @@ -610,7 +610,7 @@ def is_pseudoprime(n):

def is_prime_power(n, get_data=False):
r"""
Test whether ``n`` is a positive power of a prime number
Test whether ``n`` is a positive power of a prime number.
This function simply calls the method :meth:`Integer.is_prime_power()
<sage.rings.integer.Integer.is_prime_power>` of Integers.
Expand Down Expand Up @@ -1861,7 +1861,7 @@ def gcd(a, b=None, **kwargs):

def __GCD_sequence(v, **kwargs):
"""
Internal function returning the gcd of the elements of a sequence
Internal function returning the gcd of the elements of a sequence.
INPUT:
Expand Down Expand Up @@ -3637,7 +3637,7 @@ def CRT_vectors(X, moduli):

def binomial(x, m, **kwds):
r"""
Return the binomial coefficient
Return the binomial coefficient.
.. MATH::
Expand Down Expand Up @@ -5318,7 +5318,7 @@ def integer_floor(x):

def integer_trunc(i):
"""
Truncate to the integer closer to zero
Truncate to the integer closer to zero.
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/calculus/calculus.py
Original file line number Diff line number Diff line change
Expand Up @@ -2112,7 +2112,7 @@ def dummy_inverse_laplace(*args):

def dummy_pochhammer(*args):
"""
This function is called to create formal wrappers of Pochhammer symbols
This function is called to create formal wrappers of Pochhammer symbols.
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/additive_magmas.py
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ def extra_super_categories(self):
class ParentMethods:
def zero(self):
r"""
Returns the zero of this group
Return the zero of this group.
EXAMPLES::
Expand Down
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 @@ -17,7 +17,7 @@

class AffineWeylGroups(Category_singleton):
"""
The category of affine Weyl groups
The category of affine Weyl groups.
.. TODO:: add a description of this category
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/algebra_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self, A):
@classmethod
def an_instance(cls):
"""
Returns an instance of this class
Return an instance of this class.
EXAMPLES::
Expand Down
8 changes: 4 additions & 4 deletions src/sage/categories/algebras.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class Algebras(CategoryWithAxiom_over_base_ring):
# For backward compatibility?
def __contains__(self, x):
"""
Membership testing
Membership testing.
EXAMPLES::
Expand Down Expand Up @@ -224,7 +224,7 @@ class ElementMethods:
# TODO: move the content of AlgebraElement here or higher in the category hierarchy
def _div_(self, y):
"""
Division by invertible elements
Division by invertible elements.
# TODO: move in Monoids
Expand Down Expand Up @@ -273,7 +273,7 @@ def algebra_generators(self):

class CartesianProducts(CartesianProductsCategory):
"""
The category of algebras constructed as Cartesian products of algebras
The category of algebras constructed as Cartesian products of algebras.
This construction gives the direct product of algebras. See
discussion on:
Expand Down Expand Up @@ -327,7 +327,7 @@ class DualObjects(DualObjectsCategory):

def extra_super_categories(self):
r"""
Return the dual category
Return the dual category.
EXAMPLES:
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/algebras_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ class ParentMethods:
@cached_method
def one_basis(self):
"""
Returns the index of the one of this tensor product of
Return the index of the one of this tensor product of
algebras, as per ``AlgebrasWithBasis.ParentMethods.one_basis``
It is the tuple whose operands are the indices of the
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/bialgebras.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

class Bialgebras(Category_over_base_ring):
"""
The category of bialgebras
The category of bialgebras.
EXAMPLES::
Expand Down
28 changes: 14 additions & 14 deletions src/sage/categories/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ def _repr_(self):

def _latex_(self):
r"""
Returns the latex representation of this category.
Return the latex representation of this category.
EXAMPLES::
Expand Down Expand Up @@ -682,7 +682,7 @@ def _subcategory_hook_(self, category):

def __contains__(self, x):
"""
Membership testing
Membership testing.
Returns whether ``x`` is an object in this category, that is
if the category of ``x`` is a subcategory of ``self``.
Expand Down Expand Up @@ -785,7 +785,7 @@ def is_abelian(self):

def category_graph(self):
r"""
Returns the graph of all super categories of this category
Return the graph of all super categories of this category.
EXAMPLES::
Expand Down Expand Up @@ -926,7 +926,7 @@ def _set_of_super_categories(self):

def all_super_categories(self, proper=False):
"""
Returns the list of all super categories of this category.
Return the list of all super categories of this category.
INPUT:
Expand Down Expand Up @@ -1399,7 +1399,7 @@ def _test_category_graph(self, **options):

def _test_category(self, **options):
r"""
Run generic tests on this category
Run generic tests on this category.
.. SEEALSO:: :class:`TestSuite`.
Expand Down Expand Up @@ -1746,7 +1746,7 @@ def morphism_class(self):

def required_methods(self):
"""
Returns the methods that are required and optional for parents
Return the methods that are required and optional for parents
in this category and their elements.
EXAMPLES::
Expand All @@ -1761,7 +1761,7 @@ def required_methods(self):
# Operations on the lattice of categories
def is_subcategory(self, c):
"""
Returns ``True`` if self is naturally embedded as a subcategory of `c`.
Return ``True`` if self is naturally embedded as a subcategory of `c`.
EXAMPLES::
Expand Down Expand Up @@ -1880,7 +1880,7 @@ def _is_subclass(self, c):
@cached_method
def _meet_(self, other):
"""
Returns the largest common subcategory of self and other:
Return the largest common subcategory of self and other.
EXAMPLES::
Expand Down Expand Up @@ -1937,7 +1937,7 @@ def _meet_(self, other):
@staticmethod
def meet(categories):
"""
Returns the meet of a list of categories
Return the meet of a list of categories.
INPUT:
Expand Down Expand Up @@ -2504,7 +2504,7 @@ def category(self):

def example(self, *args, **keywords):
"""
Returns an object in this category. Most of the time, this is a parent.
Return an object in this category. Most of the time, this is a parent.
This serves three purposes:
Expand Down Expand Up @@ -2561,7 +2561,7 @@ def example(self, *args, **keywords):

def is_Category(x):
"""
Returns ``True`` if `x` is a category.
Return ``True`` if `x` is a category.
EXAMPLES::
Expand Down Expand Up @@ -2940,7 +2940,7 @@ class JoinCategory(CategoryWithParameters):

def __init__(self, super_categories, **kwds):
"""
Initializes this JoinCategory
Initializes this JoinCategory.
INPUT:
Expand Down Expand Up @@ -3000,7 +3000,7 @@ def _make_named_class_key(self, name):

def super_categories(self):
"""
Returns the immediate super categories, as per :meth:`Category.super_categories`.
Return the immediate super categories, as per :meth:`Category.super_categories`.
EXAMPLES::
Expand All @@ -3026,7 +3026,7 @@ def additional_structure(self):

def _subcategory_hook_(self, category):
"""
Returns whether ``category`` is a subcategory of this join category
Return whether ``category`` is a subcategory of this join category.
INPUT:
Expand Down
Loading

0 comments on commit 0716b41

Please sign in to comment.