diff --git a/examples/astropy.toml b/examples/astropy.toml index 41d3d8b4..fdd16281 100644 --- a/examples/astropy.toml +++ b/examples/astropy.toml @@ -1,7 +1,7 @@ [global] module = 'astropy' logo = "img/astropy_project_logo.svg" -exclude = [ "astropy.utils.misc:OrderedDescriptorContainer", +exclude = [ # VisitTargetNotImplementedError "astropy.utils.data:download_file", #"ExecError-": [ diff --git a/examples/dask.toml b/examples/dask.toml index 5541d602..31902979 100644 --- a/examples/dask.toml +++ b/examples/dask.toml @@ -8,7 +8,6 @@ exclude = [ "dask.utils:Dispatch", # target not implemented 'dask.highlevelgraph:HighLevelGraph.visualize', 'dask.array.overlap:map_overlap', - 'dask.order:graph_metrics', # AssertionError : Serialisation proble "dask.array.routines:matmul", "dask.array.routines:rot90", diff --git a/examples/matplotlib.toml b/examples/matplotlib.toml index d20d199d..d06e9cb8 100644 --- a/examples/matplotlib.toml +++ b/examples/matplotlib.toml @@ -17,6 +17,12 @@ execute_exclude_patterns = [ "matplotlib._api:check_isinstance", "matplotlib._api:check_in_list", "matplotlib._api:check_getitem", + # examples are not meant to be executed, + # contain undefined variables + "matplotlib.axes._axes:Axes.text" + # Method in example used as standalone function,-> missing self + "matplotlib.axes._axes:Axes.axhline", + "matplotlib.axes._axes:Axes.axvline" ] examples_exclude = [ # jedi inference issue diff --git a/papyri/gen.py b/papyri/gen.py index 0596cbb0..abc6bdd3 100644 --- a/papyri/gen.py +++ b/papyri/gen.py @@ -1388,6 +1388,12 @@ def debugprint(*args): docstring=example_code, ) if config.execute_doctests: + with warnings.catch_warnings(): + warnings.filterwarnings( + "ignore", + message="is non-interactive, and thus cannot be shown", + category=UserWarning, + ) doctest_runner.run(doctests, out=debugprint, clear_globs=False) doctest_runner.globs.update(doctests.globs) example_section_data.extend( @@ -1403,7 +1409,7 @@ def debugprint(*args): # TODO fix this if plt.close not called and still a lingering figure. fig_managers = _pylab_helpers.Gcf.get_all_fig_managers() if len(fig_managers) != 0: - print_(f"Unclosed figures in {qa}!!") + # print_(f"Unclosed figures in {qa}!!") plt.close("all") return processed_example_data(example_section_data), doctest_runner.figs diff --git a/papyri/vref.py b/papyri/vref.py index 9431f25d..8ef68723 100644 --- a/papyri/vref.py +++ b/papyri/vref.py @@ -36,7 +36,7 @@ def __setitem__(self, key, value): super().__setitem__(key, value) assert ( key not in self.ordered_sections - ), f"assert {key} not in {self.ordered_sections}, {super().__getitem__(key)}, {value}" + ), f"assert {key!r} not in {self.ordered_sections}, {super().__getitem__(key)}, {value}" self.ordered_sections.append(key) def _guess_header(self, header):