Skip to content

Commit 74e8a3f

Browse files
authored
Misc cleanup (#392)
This update a few config due to new package versions and silence a few messages.
2 parents f56cd52 + 7795884 commit 74e8a3f

File tree

5 files changed

+15
-4
lines changed

5 files changed

+15
-4
lines changed

examples/astropy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[global]
22
module = 'astropy'
33
logo = "img/astropy_project_logo.svg"
4-
exclude = [ "astropy.utils.misc:OrderedDescriptorContainer",
4+
exclude = [
55
# VisitTargetNotImplementedError
66
"astropy.utils.data:download_file",
77
#"ExecError-<class 'ValueError'>": [

examples/dask.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ exclude = [ "dask.utils:Dispatch",
88
# target not implemented
99
'dask.highlevelgraph:HighLevelGraph.visualize',
1010
'dask.array.overlap:map_overlap',
11-
'dask.order:graph_metrics',
1211
# AssertionError : Serialisation proble
1312
"dask.array.routines:matmul",
1413
"dask.array.routines:rot90",

examples/matplotlib.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ execute_exclude_patterns = [
1717
"matplotlib._api:check_isinstance",
1818
"matplotlib._api:check_in_list",
1919
"matplotlib._api:check_getitem",
20+
# examples are not meant to be executed,
21+
# contain undefined variables
22+
"matplotlib.axes._axes:Axes.text"
23+
# Method in example used as standalone function,-> missing self
24+
"matplotlib.axes._axes:Axes.axhline",
25+
"matplotlib.axes._axes:Axes.axvline"
2026
]
2127
examples_exclude = [
2228
# jedi inference issue

papyri/gen.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1388,6 +1388,12 @@ def debugprint(*args):
13881388
docstring=example_code,
13891389
)
13901390
if config.execute_doctests:
1391+
with warnings.catch_warnings():
1392+
warnings.filterwarnings(
1393+
"ignore",
1394+
message="is non-interactive, and thus cannot be shown",
1395+
category=UserWarning,
1396+
)
13911397
doctest_runner.run(doctests, out=debugprint, clear_globs=False)
13921398
doctest_runner.globs.update(doctests.globs)
13931399
example_section_data.extend(
@@ -1403,7 +1409,7 @@ def debugprint(*args):
14031409
# TODO fix this if plt.close not called and still a lingering figure.
14041410
fig_managers = _pylab_helpers.Gcf.get_all_fig_managers()
14051411
if len(fig_managers) != 0:
1406-
print_(f"Unclosed figures in {qa}!!")
1412+
# print_(f"Unclosed figures in {qa}!!")
14071413
plt.close("all")
14081414

14091415
return processed_example_data(example_section_data), doctest_runner.figs

papyri/vref.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def __setitem__(self, key, value):
3636
super().__setitem__(key, value)
3737
assert (
3838
key not in self.ordered_sections
39-
), f"assert {key} not in {self.ordered_sections}, {super().__getitem__(key)}, {value}"
39+
), f"assert {key!r} not in {self.ordered_sections}, {super().__getitem__(key)}, {value}"
4040
self.ordered_sections.append(key)
4141

4242
def _guess_header(self, header):

0 commit comments

Comments
 (0)