Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0d1effc

Browse filesBrowse files
authored
Merge pull request #12845 from anntzer/textpath
Deprecate silent dropping of unknown arguments to TextPath().
2 parents 64f0309 + c25f01f commit 0d1effc
Copy full SHA for 0d1effc

File tree

Expand file treeCollapse file tree

2 files changed

+12
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+12
-6
lines changed
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Deprecations
2+
````````````
3+
4+
The `TextPath` constructor used to silently drop ignored arguments; this
5+
behavior is deprecated.

‎lib/matplotlib/textpath.py

Copy file name to clipboardExpand all lines: lib/matplotlib/textpath.py
+7-6Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -463,21 +463,22 @@ def __init__(self, xy, s, size=None, prop=None,
463463
Also see :doc:`/gallery/text_labels_and_annotations/demo_text_path`.
464464
"""
465465

466+
if kl or kwargs:
467+
cbook.warn_deprecated(
468+
"3.1", message="Additional agruments to TextPath used to be "
469+
"ignored, but will trigger a TypeError %(removal)s.")
470+
466471
if prop is None:
467472
prop = FontProperties()
468-
469473
if size is None:
470474
size = prop.get_size_in_points()
471475

472476
self._xy = xy
473477
self.set_size(size)
474478

475479
self._cached_vertices = None
476-
477-
self._vertices, self._codes = self.text_get_vertices_codes(
478-
prop, s,
479-
usetex=usetex)
480-
480+
self._vertices, self._codes = \
481+
self.text_get_vertices_codes(prop, s, usetex=usetex)
481482
self._should_simplify = False
482483
self._simplify_threshold = rcParams['path.simplify_threshold']
483484
self._interpolation_steps = _interpolation_steps

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.