Skip to content

Commit

Permalink
Docstring edits
Browse files Browse the repository at this point in the history
Remove trailing dots and excessive spaces, ="<string>" to ='<string>', uncapitalize after "--", etc.
  • Loading branch information
gmou3 committed Jun 8, 2024
1 parent 9eab12f commit 6c70e9e
Show file tree
Hide file tree
Showing 100 changed files with 533 additions and 553 deletions.
4 changes: 2 additions & 2 deletions src/sage/algebras/affine_nil_temperley_lieb.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self, n, R=ZZ, prefix='a'):
EXAMPLES::
sage: A = AffineNilTemperleyLiebTypeA(3, prefix="a"); A
sage: A = AffineNilTemperleyLiebTypeA(3, prefix='a'); A
The affine nilTemperley Lieb algebra A3 over the ring Integer Ring
sage: TestSuite(A).run()
sage: A = AffineNilTemperleyLiebTypeA(3, QQ); A
Expand Down Expand Up @@ -76,7 +76,7 @@ def _element_constructor_(self, w):
EXAMPLES::
sage: A = AffineNilTemperleyLiebTypeA(3, prefix="a")
sage: A = AffineNilTemperleyLiebTypeA(3, prefix='a')
sage: W = A.weyl_group()
sage: w = W.from_reduced_word([2,1,2])
sage: A(w)
Expand Down
2 changes: 1 addition & 1 deletion src/sage/algebras/associated_graded.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def algebra_generators(self):
Finite family {'x': bar(U['x']), 'y': bar(U['y']), 'z': bar(U['z'])}
"""
G = self._A.algebra_generators()
return Family(G.keys(), lambda x: self(G[x]), name="generator")
return Family(G.keys(), lambda x: self(G[x]), name='generator')

def degree_on_basis(self, x):
"""
Expand Down
40 changes: 20 additions & 20 deletions src/sage/algebras/clifford_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -2134,7 +2134,7 @@ def __init__(self, E, s_coeff):
We skip the pickling test as there is an infinite recursion when
doing equality checks::
sage: TestSuite(par).run(skip="_test_pickling")
sage: TestSuite(par).run(skip='_test_pickling')
Check that it knows it is a finite-dimensional algebra
morphism (:issue:`25339`):;
Expand Down Expand Up @@ -2731,7 +2731,7 @@ class ExteriorAlgebraIdeal(Ideal_nc):
sage: xbar * ybar
0
"""
def __init__(self, ring, gens, coerce=True, side="twosided"):
def __init__(self, ring, gens, coerce=True, side='twosided'):
"""
Initialize ``self``.
Expand All @@ -2742,13 +2742,13 @@ def __init__(self, ring, gens, coerce=True, side="twosided"):
sage: E.<y, x> = ExteriorAlgebra(QQ)
sage: I = E.ideal([x*y - x, x*y - 1])
sage: TestSuite(I).run(skip="_test_category")
sage: TestSuite(I).run(skip='_test_category')
sage: I = E.ideal([x*y - 3, 0, 2*3])
sage: TestSuite(I).run(skip="_test_category")
sage: TestSuite(I).run(skip='_test_category')
sage: I = E.ideal([])
sage: TestSuite(I).run(skip="_test_category")
sage: TestSuite(I).run(skip='_test_category')
"""
self._groebner_strategy = None
self._reduced = False
Expand Down Expand Up @@ -2790,7 +2790,7 @@ def _contains_(self, f):
EXAMPLES::
sage: E.<x,y,z> = ExteriorAlgebra(QQ)
sage: I = E.ideal([x, x*y*z + 2*x*z + 3*y*z], side="left")
sage: I = E.ideal([x, x*y*z + 2*x*z + 3*y*z], side='left')
sage: I.groebner_basis()
(x, y*z)
sage: x in I
Expand Down Expand Up @@ -2843,9 +2843,9 @@ def __richcmp__(self, other, op):
sage: E.<a,b,c,d> = ExteriorAlgebra(QQ)
sage: p = a + b*c
sage: IT = E.ideal([p], side="twosided")
sage: IR = E.ideal([p], side="right")
sage: IL = E.ideal([p], side="left")
sage: IT = E.ideal([p], side='twosided')
sage: IR = E.ideal([p], side='right')
sage: IL = E.ideal([p], side='left')
sage: IR == IL
False
sage: IR <= IL
Expand Down Expand Up @@ -2931,7 +2931,7 @@ def __mul__(self, other):
sage: E.<a,b,c,d> = ExteriorAlgebra(QQ)
sage: I = E.ideal([a + 1], side="left")
sage: I = E.ideal([a + 1], side='left')
sage: J = I * I; J
Left Ideal (2*a + 1, a, b, c, d, a*b, a*c, a*d, 2*a*b*c + b*c, 2*a*b*d + b*d,
2*a*c*d + c*d, a*b*c, a*b*d, a*c*d, b*c*d, a*b*c*d)
Expand All @@ -2950,10 +2950,10 @@ def __mul__(self, other):
sage: K = J * I
sage: K
Left Ideal (-a*b - a*c + b + c) of The exterior algebra of rank 4 over Rational Field
sage: E.ideal([J.gen(0) * d * I.gen(0)], side="left") <= K
sage: E.ideal([J.gen(0) * d * I.gen(0)], side='left') <= K
True
sage: J = E.ideal([b + c*d], side="right")
sage: J = E.ideal([b + c*d], side='right')
sage: I * J
Twosided Ideal (a*c*d + a*b + c*d + b) of The exterior algebra of rank 4 over Rational Field
sage: X = J * I; X
Expand All @@ -2966,7 +2966,7 @@ def __mul__(self, other):
sage: a * p # not a left ideal
a*c*d + a*b
sage: I = E.ideal([a + 1], side="right")
sage: I = E.ideal([a + 1], side='right')
sage: E.ideal([1]) * I
Twosided Ideal (a + 1) of The exterior algebra of rank 4 over Rational Field
sage: I * E.ideal([1])
Expand All @@ -2986,9 +2986,9 @@ def __mul__(self, other):

if self.side() == "left" or self.side() == "twosided":
if other.side() == "right" or other.side() == "twosided":
return self.ring().ideal(gens, side="twosided")
return self.ring().ideal(gens, side="left")
return self.ring().ideal(gens, side="right")
return self.ring().ideal(gens, side='twosided')
return self.ring().ideal(gens, side='left')
return self.ring().ideal(gens, side='right')

def groebner_basis(self, term_order=None, reduced=True):
r"""
Expand All @@ -2999,9 +2999,9 @@ def groebner_basis(self, term_order=None, reduced=True):
- ``term_order`` -- the term order used to compute the Gröbner basis;
must be one of the following:
* ``"neglex"`` -- (default) negative (read right-to-left) lex order
* ``"degrevlex"`` -- degree reverse lex order
* ``"deglex"`` -- degree lex order
* ``'neglex'`` -- (default) negative (read right-to-left) lex order
* ``'degrevlex'`` -- degree reverse lex order
* ``'deglex'`` -- degree lex order
- ``reduced`` -- boolean (default: ``True``); whether or not to return
the reduced Gröbner basis
Expand Down Expand Up @@ -3038,7 +3038,7 @@ def groebner_basis(self, term_order=None, reduced=True):
-a*c*d + a*c*e - a*d*e + c*d*e)
The example above was computed first using M2, which agrees with
the ``"degrevlex"`` ordering::
the ``'degrevlex'`` ordering::
E = QQ[a..e, SkewCommutative => true]
I = ideal( c*d*e - b*d*e + b*c*e - b*c*d,
Expand Down
34 changes: 17 additions & 17 deletions src/sage/algebras/cluster_algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ class ClusterAlgebraSeed(SageObject):
- ``G`` -- the matrix of g-vectors of ``self``
- ``parent`` -- :class:`ClusterAlgebra`; the algebra to which the
seed belongs
- ``path`` -- list (default ``[]``); the mutation sequence from the
- ``path`` -- list (default: ``[]``); the mutation sequence from the
initial seed of ``parent`` to ``self``
.. WARNING::
Expand Down Expand Up @@ -1055,10 +1055,10 @@ def mutate(self, direction, **kwargs):
* an iterable of such integers to mutate along a sequence
* a string "sinks" or "sources" to mutate at all sinks or sources simultaneously
- ``inplace`` -- boolean (default ``True``); whether to mutate in place
- ``inplace`` -- boolean (default: ``True``); whether to mutate in place
or to return a new object
- ``mutating_F`` -- boolean (default ``True``); whether to compute
- ``mutating_F`` -- boolean (default: ``True``); whether to compute
F-polynomials while mutating
.. NOTE::
Expand Down Expand Up @@ -1220,22 +1220,22 @@ class ClusterAlgebra(Parent, UniqueRepresentation):
- ``data`` -- some data defining a cluster algebra; it can be anything
that can be parsed by :class:`ClusterQuiver`
- ``scalars`` -- a ring (default `\ZZ`); the scalars over
- ``scalars`` -- a ring (default: `\ZZ`); the scalars over
which the cluster algebra is defined
- ``cluster_variable_prefix`` -- string (default ``'x'``); it needs to be
- ``cluster_variable_prefix`` -- string (default: ``'x'``); it needs to be
a valid variable name
- ``cluster_variable_names`` -- list of strings; each element needs
to be a valid variable name; supersedes ``cluster_variable_prefix``
- ``coefficient_prefix`` -- string (default ``'y'``); it needs to be
- ``coefficient_prefix`` -- string (default: ``'y'``); it needs to be
a valid variable name.
- ``coefficient_names`` -- list of strings; each element needs
to be a valid variable name; supersedes ``cluster_variable_prefix``
- ``principal_coefficients`` -- boolean (default ``False``); supersedes any
- ``principal_coefficients`` -- boolean (default: ``False``); supersedes any
coefficient defined by ``data``
ALGORITHM:
Expand Down Expand Up @@ -1812,7 +1812,7 @@ def g_vectors(self, mutating_F=True):
INPUT:
- ``mutating_F`` -- boolean (default ``True``); whether to compute
- ``mutating_F`` -- boolean (default: ``True``); whether to compute
F-polynomials; disable this for speed considerations
ALGORITHM:
Expand Down Expand Up @@ -1996,7 +1996,7 @@ def find_g_vector(self, g_vector, depth=infinity):
INPUT:
- ``g_vector`` -- a tuple: the g-vector to find
- ``depth`` -- a positive integer or infinity (default ``infinity``);
- ``depth`` -- a positive integer or infinity (default: ``infinity``);
the maximum distance from ``self.current_seed`` to reach
OUTPUT:
Expand Down Expand Up @@ -2213,19 +2213,19 @@ def seeds(self, **kwargs):
INPUT:
- ``from_current_seed`` -- boolean (default ``False``); whether to start
- ``from_current_seed`` -- boolean (default: ``False``); whether to start
the iterator from :meth:`current_seed` or :meth:`initial_seed`
- ``mutating_F`` -- boolean (default ``True``); whether to compute
- ``mutating_F`` -- boolean (default: ``True``); whether to compute
F-polynomials also; disable this for speed considerations
- ``allowed_directions`` -- iterable of integers
(default ``range(self.rank())``); the directions in which to mutate
(default: ``range(self.rank())``); the directions in which to mutate
- ``depth`` -- a positive integer or infinity (default ``infinity``);
- ``depth`` -- a positive integer or infinity (default: ``infinity``);
the maximum depth at which to stop searching
- ``catch_KeyboardInterrupt`` -- boolean (default ``False``); whether to
- ``catch_KeyboardInterrupt`` -- boolean (default: ``False``); whether to
catch ``KeyboardInterrupt`` and return it rather then raising an
exception -- this allows the iterator returned by this method to be
resumed after being interrupted
Expand Down Expand Up @@ -2320,7 +2320,7 @@ def reset_exploring_iterator(self, mutating_F=True):
INPUT:
- ``mutating_F`` -- boolean (default ``True``); whether to also compute
- ``mutating_F`` -- boolean (default: ``True``); whether to also compute
F-polynomials; disable this for speed considerations
EXAMPLES::
Expand Down Expand Up @@ -2371,7 +2371,7 @@ def cluster_fan(self, depth=infinity):
INPUT:
- ``depth`` -- a positive integer or infinity (default ``infinity``);
- ``depth`` -- a positive integer or infinity (default: ``infinity``);
the maximum depth at which to compute
EXAMPLES::
Expand Down Expand Up @@ -2402,7 +2402,7 @@ def mutate_initial(self, direction, **kwargs):
* an iterable of such integers to mutate along a sequence
* a string "sinks" or "sources" to mutate at all sinks or sources simultaneously
- ``mutating_F`` -- boolean (default ``True``); whether to compute
- ``mutating_F`` -- boolean (default: ``True``); whether to compute
F-polynomials while mutating
.. NOTE::
Expand Down
20 changes: 10 additions & 10 deletions src/sage/algebras/commutative_dga.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def __init__(self, A, im_gens):
We skip the category test because homsets/morphisms aren't
proper parents/elements yet::
sage: TestSuite(d).run(skip="_test_category")
sage: TestSuite(d).run(skip='_test_category')
An error is raised if the differential `d` does not have
degree 1 or if `d \circ d` is not zero::
Expand Down Expand Up @@ -612,7 +612,7 @@ def __init__(self, A, im_gens):
We skip the category test because homsets/morphisms aren't
proper parents/elements yet::
sage: TestSuite(d).run(skip="_test_category")
sage: TestSuite(d).run(skip='_test_category')
"""
Differential.__init__(self, A, im_gens)

Expand Down Expand Up @@ -693,7 +693,7 @@ def coboundaries(self, n, total=False):
INPUT:
- ``n`` -- degree
- ``total`` -- boolean (default ``False``); if ``True``, return the
- ``total`` -- boolean (default: ``False``); if ``True``, return the
coboundaries in total degree `n`
If `n` is an integer rather than a multi-index, then the
Expand Down Expand Up @@ -1490,7 +1490,7 @@ def is_homogeneous(self, total=False):
INPUT:
- ``total`` -- boolean (default ``False``); only used in the
- ``total`` -- boolean (default: ``False``); only used in the
multi-graded case, in which case if ``True``, check to see
if ``self`` is homogeneous with respect to total degree
Expand Down Expand Up @@ -1664,7 +1664,7 @@ def basis_coefficients(self, total=False):
INPUT:
- ``total`` -- boolean (default ``False``); this
- ``total`` -- boolean (default: ``False``); this
is only used in the multi-graded case, in which case if
``True``, it returns the coefficients with respect to
the basis for the total degree of this element
Expand Down Expand Up @@ -2538,16 +2538,16 @@ def minimal_model(self, i=3, max_iterations=3, partial_result=False):
- ``i`` -- integer (default: `3`); degree to which the result is
required to induce an isomorphism in cohomology, and the domain is
required to be minimal.
required to be minimal
- ``max_iterations`` -- integer (default: `3`); the number of
iterations of the method at each degree. If the algorithm does not
finish in this many iterations at each degree, an error is raised,
or the partial result computed up to that point is returned, deppending
on the ``partial_result`` flag.
- ``partial_result`` -- boolean (default: ``False``); wether to return
the partial result if the ``max_iterations`` limit is reached.
- ``partial_result`` -- boolean (default: ``False``); wether to return
the partial result if the ``max_iterations`` limit is reached
OUTPUT:
Expand Down Expand Up @@ -3325,7 +3325,7 @@ def coboundaries(self, n, total=False):
INPUT:
- ``n`` -- degree
- ``total`` (default ``False``) -- if ``True``, return the
- ``total`` -- boolean (default: ``False``); if ``True``, return the
coboundaries in total degree `n`
If `n` is an integer rather than a multi-index, then the
Expand Down Expand Up @@ -3725,7 +3725,7 @@ def __init__(self, parent, im_gens, check=True):
Defn: (x, y) --> (x, x)
sage: f.is_graded()
False
sage: TestSuite(f).run(skip="_test_category")
sage: TestSuite(f).run(skip='_test_category')
Since `x^2=0` but `y^2 \neq 0`, the following does not define a valid morphism::
Expand Down
14 changes: 7 additions & 7 deletions src/sage/algebras/exterior_algebra_groebner.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ cdef class GBElement:
sage: from sage.algebras.exterior_algebra_groebner import GBElement
sage: E.<a,b,c,d> = ExteriorAlgebra(QQ)
sage: X = GBElement(a, a.leading_support(), 1)
sage: TestSuite(X).run(skip="_test_pickling")
sage: TestSuite(X).run(skip='_test_pickling')
"""
self.elt = x
self.ls = ls
Expand Down Expand Up @@ -114,9 +114,9 @@ cdef class GroebnerStrategy:
sage: from sage.algebras.exterior_algebra_groebner import GroebnerStrategy
sage: E.<a,b,c,d> = ExteriorAlgebra(QQ)
sage: I = E.ideal([a + 1], side="left")
sage: I = E.ideal([a + 1], side='left')
sage: G = GroebnerStrategy(I)
sage: TestSuite(G).run(skip="_test_pickling")
sage: TestSuite(G).run(skip='_test_pickling')
"""
self.ideal = I
self.groebner_basis = (None,)
Expand Down Expand Up @@ -293,18 +293,18 @@ cdef class GroebnerStrategy:
EXAMPLES::
sage: E.<y, x> = ExteriorAlgebra(QQ)
sage: I = E.ideal([x*y - x, x*y - 1], side="left")
sage: I = E.ideal([x*y - x, x*y - 1], side='left')
sage: I.groebner_basis() # indirect doctest
(1,)
sage: J = E.ideal([x*y - x, 2*x*y - 2], side="left")
sage: J = E.ideal([x*y - x, 2*x*y - 2], side='left')
sage: J.groebner_basis() # indirect doctest
(1,)
sage: E.<a,b,c,d> = ExteriorAlgebra(QQ)
sage: I = E.ideal([a+b*c], side="left")
sage: I = E.ideal([a+b*c], side='left')
sage: I.groebner_basis() # indirect doctest
(b*c + a,)
sage: I = E.ideal([a+b*c], side="twosided")
sage: I = E.ideal([a+b*c], side='twosided')
sage: I.groebner_basis() # indirect doctest
(a*b, a*c, b*c + a, a*d)
"""
Expand Down
Loading

0 comments on commit 6c70e9e

Please sign in to comment.