|
37 | 37 |
|
38 | 38 | class CharacterArt(SageObject):
|
39 | 39 |
|
40 |
| - def __init__(self, lines=[], breakpoints=[], baseline=None): |
| 40 | + def __init__(self, lines=[], breakpoints=[], baseline=None) -> None: |
41 | 41 | r"""
|
42 | 42 | Abstract base class for character art.
|
43 | 43 |
|
@@ -135,7 +135,7 @@ def __iter__(self):
|
135 | 135 | """
|
136 | 136 | yield from self._matrix
|
137 | 137 |
|
138 |
| - def _repr_(self): |
| 138 | + def _repr_(self) -> str: |
139 | 139 | r"""
|
140 | 140 | TESTS::
|
141 | 141 |
|
@@ -203,38 +203,7 @@ def get_baseline(self):
|
203 | 203 | """
|
204 | 204 | return self._baseline
|
205 | 205 |
|
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: |
238 | 207 | """
|
239 | 208 | Test whether ``stdout`` is a TTY.
|
240 | 209 |
|
@@ -357,7 +326,7 @@ def __next__(self):
|
357 | 326 | if bp is not None:
|
358 | 327 | yield bp
|
359 | 328 |
|
360 |
| - def _split_repr_(self, size): |
| 329 | + def _split_repr_(self, size) -> str: |
361 | 330 | r"""
|
362 | 331 | Split the representation into chunks of length at most ``size``.
|
363 | 332 |
|
|
0 commit comments