Skip to content

Commit e65bd74

Browse files
author
Release Manager
committed
sagemathgh-39209: Fix docstring formatting to use raw string literals in multiple files Discovered via pytest, which follows stricter rules when parsing doctests. <!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [ ] The title is concise and informative. - [ ] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#39209 Reported by: Tobias Diez Reviewer(s): Martin Rubey
2 parents 36e0f1f + af5ff83 commit e65bd74

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/sage/algebras/free_algebra_quotient_element.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def _repr_(self):
142142
return repr_lincomb(zip(mons, cffs), strip_one=True)
143143

144144
def _latex_(self):
145-
"""
145+
r"""
146146
EXAMPLES::
147147
148148
sage: H, (i,j,k) = sage.algebras.free_algebra_quotient.hamilton_quatalg(QQ)

src/sage/algebras/lie_algebras/bgg_dual_module.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ def _repr_generator(self, m):
172172
return self._module._repr_generator(m) + "^*"
173173

174174
def _latex_generator(self, m):
175-
"""
175+
r"""
176176
Return a latex representation of the generator indexed by ``m``.
177177
178178
EXAMPLES::

src/sage/algebras/steenrod/steenrod_algebra_misc.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ def normalize_profile(profile, precision=None, truncation_type='auto', p=2, gene
567567

568568

569569
def milnor_mono_to_string(mono, latex=False, generic=False):
570-
"""
570+
r"""
571571
String representation of element of the Milnor basis.
572572
573573
This is used by the _repr_ and _latex_ methods.
@@ -720,7 +720,7 @@ def serre_cartan_mono_to_string(mono, latex=False, generic=False):
720720

721721

722722
def wood_mono_to_string(mono, latex=False):
723-
"""
723+
r"""
724724
String representation of element of Wood's Y and Z bases.
725725
726726
This is used by the _repr_ and _latex_ methods.
@@ -806,7 +806,7 @@ def wall_mono_to_string(mono, latex=False):
806806

807807

808808
def wall_long_mono_to_string(mono, latex=False):
809-
"""
809+
r"""
810810
Alternate string representation of element of Wall's basis.
811811
812812
This is used by the _repr_ and _latex_ methods.
@@ -891,7 +891,7 @@ def arnonA_mono_to_string(mono, latex=False, p=2):
891891

892892

893893
def arnonA_long_mono_to_string(mono, latex=False, p=2):
894-
"""
894+
r"""
895895
Alternate string representation of element of Arnon's A basis.
896896
897897
This is used by the _repr_ and _latex_ methods.

src/sage/misc/inline_fortran.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
def _import_module_from_path(name, path=None):
15-
"""
15+
r"""
1616
Import the module named ``name`` by searching the given path entries (or
1717
`sys.path` by default).
1818

0 commit comments

Comments
 (0)