Skip to content

Commit af5ff83

Browse files
authored
Fix docstring formatting to use raw string literals in multiple files
Discovered via pytest, which follows stricter rules when parsing doctests.
1 parent c9dd1e8 commit af5ff83

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)