Skip to content

Commit c26f608

Browse files
author
Release Manager
committed
gh-40658: remove a deprecated method in typeset/ as deprecated in #29204 ### 📝 Checklist - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. URL: #40658 Reported by: Frédéric Chapoton Reviewer(s): David Coudert
2 parents 6435352 + 4bcebb3 commit c26f608

File tree

1 file changed

+4
-35
lines changed

1 file changed

+4
-35
lines changed

src/sage/typeset/character_art.py

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
class CharacterArt(SageObject):
3939

40-
def __init__(self, lines=[], breakpoints=[], baseline=None):
40+
def __init__(self, lines=[], breakpoints=[], baseline=None) -> None:
4141
r"""
4242
Abstract base class for character art.
4343
@@ -135,7 +135,7 @@ def __iter__(self):
135135
"""
136136
yield from self._matrix
137137

138-
def _repr_(self):
138+
def _repr_(self) -> str:
139139
r"""
140140
TESTS::
141141
@@ -203,38 +203,7 @@ def get_baseline(self):
203203
"""
204204
return self._baseline
205205

206-
def get_breakpoints(self):
207-
r"""
208-
Return an iterator of breakpoints where the object can be split.
209-
210-
This method is deprecated, as its output is an implementation detail.
211-
The mere breakpoints of a character art element do not reflect the best
212-
way to split it if nested structures are involved. For details, see
213-
:issue:`29204`.
214-
215-
For example the expression::
216-
217-
5 4
218-
14x + 5x
219-
220-
can be split on position 4 (on the ``+``).
221-
222-
EXAMPLES::
223-
224-
sage: from sage.typeset.ascii_art import AsciiArt
225-
sage: p3 = AsciiArt([" * ", "***"])
226-
sage: p5 = AsciiArt([" * ", " * * ", "*****"])
227-
sage: aa = ascii_art([p3, p5])
228-
sage: aa.get_breakpoints()
229-
doctest:...: DeprecationWarning: get_breakpoints() is deprecated
230-
See https://github.com/sagemath/sage/issues/29204 for details.
231-
[6]
232-
"""
233-
from sage.misc.superseded import deprecation
234-
deprecation(29204, "get_breakpoints() is deprecated")
235-
return self._breakpoints
236-
237-
def _isatty(self):
206+
def _isatty(self) -> bool:
238207
"""
239208
Test whether ``stdout`` is a TTY.
240209
@@ -357,7 +326,7 @@ def __next__(self):
357326
if bp is not None:
358327
yield bp
359328

360-
def _split_repr_(self, size):
329+
def _split_repr_(self, size) -> str:
361330
r"""
362331
Split the representation into chunks of length at most ``size``.
363332

0 commit comments

Comments
 (0)