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

Commit9e0747b

Browse files
authored
Merge pull request#23246 from oscargus/imageinterpolationfix
2 parents10b26c9 +07bf940 commit9e0747b

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

‎lib/matplotlib/_api/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ def check_in_list(_values, *, _print_supported_values=True, **kwargs):
120120
--------
121121
>>> _api.check_in_list(["foo", "bar"], arg=arg, other_arg=other_arg)
122122
"""
123+
ifnotkwargs:
124+
raiseTypeError("No argument to check!")
123125
values=_values
124126
forkey,valinkwargs.items():
125127
ifvalnotinvalues:

‎lib/matplotlib/image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ def set_interpolation_stage(self, s):
787787
"""
788788
ifsisNone:
789789
s="data"# placeholder for maybe having rcParam
790-
_api.check_in_list(['data','rgba'])
790+
_api.check_in_list(['data','rgba'],s=s)
791791
self._interpolation_stage=s
792792
self.stale=True
793793

‎lib/matplotlib/tests/test_api.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,8 @@ def test_deprecation_alternative():
9393
deff():
9494
pass
9595
assertalternativeinf.__doc__
96+
97+
98+
deftest_empty_check_in_list():
99+
withpytest.raises(TypeError,match="No argument to check!"):
100+
_api.check_in_list(["a"])

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp