🌐 AI搜索 & 代理 主页
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1502,6 +1502,8 @@ def func(foo, label=None): ...

@functools.wraps(func)
def inner(ax, *args, data=None, **kwargs):
__tracebackhide__ = True

if data is None:
return func(
ax,
Expand Down
7 changes: 7 additions & 0 deletions lib/matplotlib/_api/deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ def emit_warning():
removal=removal)

def wrapper(*args, **kwargs):
__tracebackhide__ = True
emit_warning()
return func(*args, **kwargs)

Expand Down Expand Up @@ -286,6 +287,8 @@ def func(good_name): ...

@functools.wraps(func)
def wrapper(*args, **kwargs):
__tracebackhide__ = True

if old in kwargs:
warn_deprecated(
since, message=f"The {old!r} parameter of {func.__name__}() "
Expand Down Expand Up @@ -376,6 +379,8 @@ def func(used_arg, other_arg, unused, more_args): ...

@functools.wraps(func)
def wrapper(*inner_args, **inner_kwargs):
__tracebackhide__ = True

if len(inner_args) <= name_idx and name not in inner_kwargs:
# Early return in the simple, non-deprecated case (much faster than
# calling bind()).
Expand Down Expand Up @@ -441,6 +446,8 @@ def make_keyword_only(since, name, func=None):

@functools.wraps(func)
def wrapper(*args, **kwargs):
__tracebackhide__ = True

# Don't use signature.bind here, as it would fail when stacked with
# rename_parameter and an "old" argument name is passed in
# (signature.bind would fail, but the actual call would succeed).
Expand Down
Loading