()
| 124 | |
| 125 | |
| 126 | def test_delete_parameter() -> None: |
| 127 | @_api.delete_parameter("3.0", "foo") |
| 128 | def func1(foo: Any = None) -> None: |
| 129 | pass |
| 130 | |
| 131 | @_api.delete_parameter("3.0", "foo") |
| 132 | def func2(**kwargs: Any) -> None: |
| 133 | pass |
| 134 | |
| 135 | for func in [func1, func2]: # type: ignore[list-item] |
| 136 | func() # No warning. |
| 137 | with pytest.warns(mpl.MatplotlibDeprecationWarning): |
| 138 | func(foo="bar") |
| 139 | |
| 140 | def pyplot_wrapper(foo: Any = _api.deprecation._deprecated_parameter) -> None: |
| 141 | func1(foo) |
| 142 | |
| 143 | pyplot_wrapper() # No warning. |
| 144 | with pytest.warns(mpl.MatplotlibDeprecationWarning): |
| 145 | func(foo="bar") |
| 146 | |
| 147 | |
| 148 | def test_make_keyword_only() -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…