Skip to content

Commit 7885216

Browse files
author
Release Manager
committed
gh-36078: `sage.{interacts,misc,repl,typeset}`: Update `# needs`, modularization fixes <!-- ^^^^^ Please provide a concise, informative and self-explanatory title. Don't put issue numbers in there, do this in the PR body below. For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1" --> <!-- Describe your changes here in detail --> <!-- Why is this change required? What problem does it solve? --> <!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". --> - Part of: #29705 - Cherry-picked from: #35095 <!-- If your change requires a documentation PR, please link it appropriately. --> ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> <!-- If your change requires a documentation PR, please link it appropriately --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> <!-- Feel free to remove irrelevant items. --> - [x] The title is concise, informative, and self-explanatory. - [ ] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on - #12345: short description why this is a dependency - #34567: ... --> <!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> URL: #36078 Reported by: Matthias Köppe Reviewer(s): David Coudert, Matthias Köppe
2 parents b99418f + bd0fdd5 commit 7885216

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1384
-1136
lines changed

src/sage/groups/abelian_gps/dual_abelian_group_element.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def is_DualAbelianGroupElement(x) -> bool:
7171
EXAMPLES::
7272
7373
sage: from sage.groups.abelian_gps.dual_abelian_group import is_DualAbelianGroupElement
74-
sage: F = AbelianGroup(5,[5,5,7,8,9],names = list("abcde")).dual_group()
74+
sage: F = AbelianGroup(5, [5,5,7,8,9], names=list("abcde")).dual_group()
7575
sage: is_DualAbelianGroupElement(F)
7676
False
7777
sage: is_DualAbelianGroupElement(F.an_element())
@@ -146,7 +146,7 @@ def word_problem(self, words):
146146
147147
EXAMPLES::
148148
149-
sage: G = AbelianGroup(5,[3, 5, 5, 7, 8],names="abcde")
149+
sage: G = AbelianGroup(5,[3, 5, 5, 7, 8], names="abcde")
150150
sage: Gd = G.dual_group(names="abcde")
151151
sage: a,b,c,d,e = Gd.gens()
152152
sage: u = a^3*b*c*d^2*e^5

src/sage/interacts/library_cython.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ cpdef julia(ff_j, z, int iterations):
2828
2929
TESTS::
3030
31+
sage: # needs sage.symbolic
3132
sage: from sage.interacts.library_cython import julia
3233
sage: z = var('z')
3334
sage: c_real, c_imag = 1, 1
@@ -55,6 +56,7 @@ cpdef mandel(ff_m, z, int iterations):
5556
5657
TESTS::
5758
59+
sage: # needs sage.symbolic
5860
sage: from sage.interacts.library_cython import mandel
5961
sage: z, c = var('z, c')
6062
sage: f = symbolic_expression(z**2 + c).function(z,c)

src/sage/misc/binary_tree.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,9 @@ cdef class BinaryTree:
285285
286286
sage: from sage.misc.binary_tree import BinaryTree
287287
sage: t = BinaryTree()
288-
sage: t.insert(0,Matrix([[0,0],[1,1]]))
289-
sage: t.insert(0,1)
290-
sage: t.get(0)
288+
sage: t.insert(0, Matrix([[0,0], [1,1]])) # needs sage.modules
289+
sage: t.insert(0, 1)
290+
sage: t.get(0) # needs sage.modules
291291
[0 0]
292292
[1 1]
293293
"""

src/sage/misc/bindable_class.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,22 +175,22 @@ class BoundClass(functools.partial):
175175
176176
.. warning::
177177
178-
Since ``c`` is not a class (as tested by inspect.isclass),
178+
Since ``c`` is not a class (as tested by :func:`inspect.isclass`),
179179
and has a ``__call__`` method, IPython's introspection
180180
(with ``c?``) insists on showing not only its
181181
documentation but also its class documentation and call
182182
documentation (see :meth:`IPython.OInspect.Inspector.pdoc`)
183183
if available.
184184
185185
Until a better approach is found, we reset the documentation
186-
of ``BoundClass`` below, and make an exception for
186+
of :class:`BoundClass` below, and make an exception for
187187
:meth:`__init__` to the strict rule that every method should
188188
be doctested::
189189
190190
sage: c.__class__.__doc__
191191
sage: c.__class__.__init__.__doc__
192192
193-
Make sure classes which inherit from functools.partial have the correct
193+
Make sure classes which inherit from :class:`functools.partial` have the correct
194194
syntax, see :trac:`14748`::
195195
196196
sage: import warnings
@@ -201,7 +201,7 @@ class BoundClass(functools.partial):
201201
sage: g()
202202
8
203203
204-
The following has correct syntax and no ``DeprecationWarning``::
204+
The following has correct syntax and no :class:`DeprecationWarning`::
205205
206206
sage: class mynewpartial(functools.partial):
207207
....: def __init__(self, f, i, j):

0 commit comments

Comments
 (0)