Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0201ad6

Browse files
committed
Don't mock wx in docs build.
Otherwise, wx.GetApp() returns a truthy value and the backend switching machinery believes that a wx event loop is running, leading to warnings about show() not doing anything with agg.
1 parent dafc5e0 commit 0201ad6

File tree

2 files changed

+6
-19
lines changed

2 files changed

+6
-19
lines changed

doc/api/backend_wxagg_api.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
:mod:`matplotlib.backends.backend_wxagg`
33
========================================
44

5-
.. automodule:: matplotlib.backends.backend_wxagg
6-
:members:
7-
:undoc-members:
8-
:show-inheritance:
5+
**NOTE** Not included, to avoid adding a dependency to building the docs.
6+
7+
.. .. automodule:: matplotlib.backends.backend_wxagg
8+
.. :members:
9+
.. :undoc-members:
10+
.. :show-inheritance:

doc/sphinxext/mock_gui_toolkits.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,8 @@ class MyCairoCffi(MagicMock):
66
__name__ = "cairocffi"
77

88

9-
class MyWX(MagicMock):
10-
class Panel(object):
11-
pass
12-
13-
class ToolBar(object):
14-
pass
15-
16-
class Frame(object):
17-
pass
18-
19-
class StatusBar(object):
20-
pass
21-
22-
239
def setup(app):
2410
sys.modules.update(
2511
cairocffi=MyCairoCffi(),
26-
wx=MyWX(),
2712
)
2813
return {'parallel_read_safe': True, 'parallel_write_safe': True}

0 commit comments

Comments
 (0)