Skip to content

Commit 30a0e2e

Browse files
saskaTomAugspurger
authored andcommitted
CLN: fix mypy error pandas/tests/plotting/test_backend.py (pandas-dev#29016)
* CLN: fix mypy error pandas/tests/plotting/test_backend.py GH28926, mypy didn't like setting non-existant attribute on module. Dummy function, circumvented with __setattr__
1 parent bff90a3 commit 30a0e2e

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

pandas/tests/plotting/test_backend.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import pandas
1010

1111
dummy_backend = types.ModuleType("pandas_dummy_backend")
12-
dummy_backend.plot = lambda *args, **kwargs: None
12+
setattr(dummy_backend, "plot", lambda *args, **kwargs: None)
1313

1414

1515
@pytest.fixture

setup.cfg

-3
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,6 @@ ignore_errors=True
202202
[mypy-pandas.tests.io.json.test_ujson]
203203
ignore_errors=True
204204

205-
[mypy-pandas.tests.plotting.test_backend]
206-
ignore_errors=True
207-
208205
[mypy-pandas.tests.series.test_constructors]
209206
ignore_errors=True
210207

0 commit comments

Comments
 (0)