Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit566f0cf

Browse files
committed
Add note that make_kyword_only() must be the outer most decorator
... to the error message, that gets thrown if it is not.
1 parent83abf80 commit566f0cf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎lib/matplotlib/_api/deprecation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,8 @@ def make_keyword_only(since, name, func=None):
437437
assert (nameinsignature.parameters
438438
andsignature.parameters[name].kind==POK), (
439439
f"Matplotlib internal error:{name!r} must be a positional-or-keyword "
440-
f"parameter for{func.__name__}()")
440+
f"parameter for{func.__name__}(). If this happens on a function with a "
441+
f"pyplot wrapper, make sure make_keyword_only() is the outermost decorator.")
441442
names= [*signature.parameters]
442443
name_idx=names.index(name)
443444
kwonly= [namefornameinnames[name_idx:]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp