File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ def use(style):
153153 path = (importlib_resources .files (pkg )
154154 / f"{ name } .{ STYLE_EXTENSION } " )
155155 style = _rc_params_in_file (path )
156- except (ModuleNotFoundError , OSError ) as exc :
156+ except (ModuleNotFoundError , OSError , TypeError ) as exc :
157157 # There is an ambiguity whether a dotted name refers to a
158158 # package.style_name or to a dotted file path. Currently,
159159 # we silently try the first form and then the second one;
Original file line number Diff line number Diff line change @@ -205,3 +205,5 @@ def test_style_from_module(tmp_path, monkeypatch):
205205 assert mpl .rcParams ["lines.linewidth" ] == 42
206206 mpl .style .use ("mpl_test_style_pkg.mplstyle" )
207207 assert mpl .rcParams ["lines.linewidth" ] == 84
208+ mpl .style .use ("./mpl_test_style_pkg.mplstyle" )
209+ assert mpl .rcParams ["lines.linewidth" ] == 84
You can’t perform that action at this time.
0 commit comments