Skip to content

Commit

Permalink
Docstring suggestions by kwankyu
Browse files Browse the repository at this point in the history
  • Loading branch information
gmou3 committed Jun 17, 2024
1 parent babffff commit 16c9892
Show file tree
Hide file tree
Showing 92 changed files with 260 additions and 257 deletions.
6 changes: 3 additions & 3 deletions src/sage/algebras/commutative_dga.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ def __classcall__(cls, base, names=None, degrees=None, R=None, I=None, category=
- ``base`` -- the base ring of the algebra
- ``names`` -- the names of the variables; by default, set to ``x1``,
``x2``, etc
``x2``, etc.
- ``degrees`` -- the degrees of the generators; by default, set to 1
Expand Down Expand Up @@ -2528,8 +2528,8 @@ def vector_to_element(v, deg):

def minimal_model(self, i=3, max_iterations=3, partial_result=False):
r"""
Try to compute a map from a ``i``-minimal gcda that is a
``i``-quasi-isomorphism to self.
Try to compute a map from a `i`-minimal gcda that is a
`i`-quasi-isomorphism to ``self``.
INPUT:
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
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class AbelianLieConformalAlgebra(GradedLieConformalAlgebra):
def __init__(self, R, ngens=1, weights=None,
parity=None, names=None, index_set=None):
"""
Initialize self.
Initialize ``self``.
EXAMPLES::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class AffineLieConformalAlgebra(GradedLieConformalAlgebra):
"""
def __init__(self, R, ct, names=None, prefix=None, bracket=None):
"""
Initialize self.
Initialize ``self``.
TESTS::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class BosonicGhostsLieConformalAlgebra(GradedLieConformalAlgebra):

def __init__(self, R, ngens=2, names=None, index_set=None):
"""
Initialize self.
Initialize ``self``.
TESTS::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class FermionicGhostsLieConformalAlgebra(GradedLieConformalAlgebra):
"""
def __init__(self,R,ngens=2,names=None,index_set=None):
"""
Initialize self.
Initialize ``self``.
TESTS::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def __init__(self, R, index_set=None, central_elements=None, category=None,
element_class=None, prefix=None, names=None, latex_names=None,
**kwds):
"""
Initialize self.
Initialize ``self``.
TESTS::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class FreeBosonsLieConformalAlgebra(GradedLieConformalAlgebra):
def __init__(self, R, ngens=None, gram_matrix=None, names=None,
index_set=None):
"""
Initialize self.
Initialize ``self``.
TESTS::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class FreeFermionsLieConformalAlgebra(GradedLieConformalAlgebra):
def __init__(self, R, ngens=None, gram_matrix=None, names=None,
index_set=None):
"""
Initialize self.
Initialize ``self``.
TESTS::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class FreelyGeneratedLieConformalAlgebra(LieConformalAlgebraWithBasis):
def __init__(self, R, index_set=None, central_elements=None, category=None,
element_class=None, prefix=None, **kwds):
"""
Initialize self.
Initialize ``self``.
TESTS::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def __init__(self, R, s_coeff, index_set=None, central_elements=None,
category=None, prefix=None, names=None, latex_names=None,
parity=None, weights=None, **kwds):
"""
Initialize self.
Initialize ``self``.
TESTS::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class LieConformalAlgebraWithBasis(CombinatorialFreeModule):
def __init__(self, R, basis_keys=None, element_class=None, category=None,
prefix=None, **kwds):
"""
Initialize self.
Initialize ``self``.
TESTS::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def __init__(self, R, s_coeff, index_set=None, central_elements=None,
category=None, element_class=None, prefix=None, names=None,
latex_names=None, parity=None, **kwds):
"""
Initialize self.
Initialize ``self``.
TESTS::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class N2LieConformalAlgebra(GradedLieConformalAlgebra):
"""
def __init__(self, R):
"""
Initialize self.
Initialize ``self``.
TESTS::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class NeveuSchwarzLieConformalAlgebra(GradedLieConformalAlgebra):
"""
def __init__(self, R):
"""
Initialize self.
Initialize ``self``.
TESTS::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class VirasoroLieConformalAlgebra(GradedLieConformalAlgebra):
"""
def __init__(self, R):
"""
Initialize self.
Initialize ``self``.
TESTS::
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class WeylLieConformalAlgebra(LieConformalAlgebraWithStructureCoefficients):
def __init__(self, R, ngens=None, gram_matrix=None, names=None,
index_set=None):
"""
Initialize self.
Initialize ``self``.
TESTS::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/quantum_groups/fock_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

class FockSpaceOptions(GlobalOptions):
r"""
Sets and displays the global options for elements of the Fock
Set and display the global options for elements of the Fock
space classes. If no parameters are set, then the function
returns a copy of the options dictionary.
Expand Down
8 changes: 4 additions & 4 deletions src/sage/algebras/quatalg/quaternion_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -2686,9 +2686,9 @@ def _compute_order(self, side='left'):
INPUT:
- ``side`` -- 'left' or 'right'
- ``side`` -- ``'left'`` or ``'right'``
OUTPUT: the left order if side='left'; the right order if side='right'
OUTPUT: the left order if ``side='left'``; the right order if ``side='right'``
EXAMPLES::
Expand Down Expand Up @@ -3180,7 +3180,7 @@ def norm(self):

def conjugate(self):
"""
Return the ideal with generators the conjugates of the generators for self.
Return the ideal with generators the conjugates of the generators for ``self``.
OUTPUT: a quaternionic fractional ideal
Expand Down Expand Up @@ -3733,7 +3733,7 @@ def is_principal(self, certificate=False):

def __contains__(self, x):
"""
Return whether x is in self.
Return whether ``x`` is in ``self``.
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/quatalg/quaternion_algebra_element.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1880,7 +1880,7 @@ cdef class QuaternionAlgebraElement_number_field(QuaternionAlgebraElement_abstra

cpdef _sub_(self, _right):
"""
Subtract _right from self.
Subtract ``_right`` from ``self``.
EXAMPLES::
Expand Down
8 changes: 4 additions & 4 deletions src/sage/algebras/steenrod/steenrod_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ def _basis_key_iterator(self):

def prime(self):
r"""
The prime associated to self.
The prime associated to ``self``.
EXAMPLES::
Expand All @@ -693,7 +693,7 @@ def prime(self):

def basis_name(self):
r"""
The basis name associated to self.
The basis name associated to ``self``.
EXAMPLES::
Expand Down Expand Up @@ -3130,7 +3130,7 @@ class Element(CombinatorialFreeModule.Element):
"""
def prime(self):
"""
The prime associated to self.
The prime associated to ``self``.
EXAMPLES::
Expand All @@ -3149,7 +3149,7 @@ def prime(self):

def basis_name(self):
"""
The basis name associated to self.
The basis name associated to ``self``.
EXAMPLES::
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/weyl_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ def _repr_(self) -> str:
# add options to class
class options(GlobalOptions):
r"""
Sets the global options for elements of the differential Weyl
Set the global options for elements of the differential Weyl
algebra class. The default is to have the factored
representations turned off.
Expand Down
4 changes: 2 additions & 2 deletions src/sage/calculus/transforms/fft.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,11 @@ cdef class FastFourierTransform_complex(FastFourierTransform_base):

def __getitem__(self, i):
"""
Gets the `i`-th element of the array.
Get the `i`-th element of the array.
INPUT:
- ``i``: An integer.
- ``i`` -- integer
OUTPUT: the `i`-th element of the array ``self[i]``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ComplexReflectionOrGeneralizedCoxeterGroups(Category_singleton):
- A collection of *reflections* which are the conjugates of all
the non trivial powers of the simple reflections.
The usual notions of reduced words, length, irreducibility, etc
The usual notions of reduced words, length, irreducibility, etc.,
can be canonically defined from the above.
The following methods must be implemented:
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/covariant_functorial_construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def __call__(self, args, **kwargs):
EXAMPLES::
sage: E = CombinatorialFreeModule(QQ, ["a", "b", "c"]); E.rename("E") # needs sage.modules
sage: E = CombinatorialFreeModule(QQ, ["a", "b", "c"]); E.rename('E') # needs sage.modules
sage: tensor((E, E, E)) # needs sage.modules
E # E # E
"""
Expand Down
20 changes: 10 additions & 10 deletions src/sage/categories/coxeter_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,9 +443,9 @@ def weak_order_ideal(self, predicate, side='right', category=None):
INPUT:
- ``predicate``: a predicate on the elements of ``self`` defining an
- ``predicate`` -- a predicate on the elements of ``self`` defining an
weak order ideal in ``self``
- ``side``: "left" or "right" (default: ``'right'``)
- ``side`` -- ``'left'`` or ``'right'`` (default: ``'right'``)
OUTPUT: an enumerated set
Expand Down Expand Up @@ -891,7 +891,7 @@ def simple_projections(self, side='right', length_increasing=True):
INPUT:
- ``self`` -- a Coxeter group `W`
- ``side`` -- 'left' or 'right' (default: ``'right'``)
- ``side`` -- ``'left'`` or ``'right'`` (default: ``'right'``)
- ``length_increasing`` -- boolean (default: ``True``); whether
the operator increases or decreases length
Expand Down Expand Up @@ -1537,7 +1537,7 @@ def descents(self, side='right', index_set=None, positive=False):
- ``index_set`` -- a subset (as a list or iterable) of the nodes of the Dynkin diagram;
(default: all of them)
- ``side`` -- 'left' or 'right' (default: ``'right'``)
- ``side`` -- ``'left'`` or ``'right'`` (default: ``'right'``)
- ``positive`` -- boolean (default: ``False``)
The ``index_set`` option can be used to restrict to the
Expand Down Expand Up @@ -1578,7 +1578,7 @@ def is_grassmannian(self, side='right') -> bool:
INPUT:
- ``side`` -- "left" or "right" (default: ``'right'``)
- ``side`` -- ``'left'`` or ``'right'`` (default: ``'right'``)
An element is Grassmannian if it has at
most one descent on the right (resp. on the left).
Expand Down Expand Up @@ -2273,7 +2273,7 @@ def coset_representative(self, index_set, side='right'):
INPUT:
- ``index_set`` -- a subset (or iterable) of the nodes of the Dynkin diagram
- ``side`` -- 'left' or 'right'
- ``side`` -- ``'left'`` or ``'right'``
EXAMPLES::
Expand Down Expand Up @@ -2319,7 +2319,7 @@ def apply_simple_projection(self, i, side='right', length_increasing=True):
INPUT:
- ``i`` -- an element of the index set of the Coxeter group
- ``side`` -- 'left' or 'right' (default: ``'right'``)
- ``side`` -- ``'left'`` or ``'right'`` (default: ``'right'``)
- ``length_increasing`` -- boolean (default: ``True``);
specifying the direction of the projection
Expand Down Expand Up @@ -2714,7 +2714,7 @@ def weak_le(self, other, side='right'):
INPUT:
- ``other`` -- an element of the same Coxeter group
- ``side`` -- 'left' or 'right' (default: ``'right'``)
- ``side`` -- ``'left'`` or ``'right'`` (default: ``'right'``)
OUTPUT: boolean
Expand Down Expand Up @@ -2784,7 +2784,7 @@ def weak_covers(self, side='right', index_set=None, positive=False):
INPUT:
- ``side`` -- 'left' or 'right' (default: ``'right'``)
- ``side`` -- ``'left'`` or ``'right'`` (default: ``'right'``)
- ``positive`` -- boolean (default: ``False``)
- ``index_set`` -- list of indices or None
Expand Down Expand Up @@ -2946,7 +2946,7 @@ def apply_demazure_product(self, element, side='right',
reduced word) of elements from the index set of the
Coxeter group.
- ``side`` -- 'left' or 'right' (default: ``'right'``); the
- ``side`` -- ``'left'`` or ``'right'`` (default: ``'right'``); the
side of ``self`` on which the element should be
applied. If ``side`` is 'left' then the operation is
applied on the left.
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/examples/finite_coxeter_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def _repr_(self):

def __contains__(self, x):
r"""
Check in the element x is in the mathematical parent self.
Check if the element ``x`` is in the mathematical parent ``self``.
EXAMPLES::
Expand Down
4 changes: 2 additions & 2 deletions src/sage/categories/finite_dimensional_algebras_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ def isotypic_projective_modules(self, side='left'):
INPUT:
- ``side`` -- 'left' or 'right' (default: ``'left'``)
- ``side`` -- ``'left'`` or ``'right'`` (default: ``'left'``)
OUTPUT: list of subspaces of ``self``
Expand Down Expand Up @@ -1171,7 +1171,7 @@ def to_matrix(self, base_ring=None, action=operator.mul, side='left'):
- ``base_ring`` -- the base ring for the matrix to be constructed
- ``action`` -- a bivariate function (default: :func:`operator.mul`)
- ``side`` -- 'left' or 'right' (default: ``'left'``)
- ``side`` -- ``'left'`` or ``'right'`` (default: ``'left'``)
EXAMPLES::
Expand Down
Loading

0 comments on commit 16c9892

Please sign in to comment.