We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3274d6a + ad6431e commit bccbc2cCopy full SHA for bccbc2c
tools/boilerplate.py
@@ -459,5 +459,13 @@ def update_sig_from_node(node, sig):
459
if len(sys.argv) > 1:
460
pyplot_path = Path(sys.argv[1])
461
else:
462
- pyplot_path = Path(__file__).parent / "../lib/matplotlib/pyplot.py"
+ mpl_path = (Path(__file__).parent / ".." /"lib"/"matplotlib").resolve()
463
+ pyplot_path = mpl_path / "pyplot.py"
464
+ for cls in [Axes, Figure]:
465
+ if mpl_path not in Path(inspect.getfile(cls)).parents:
466
+ raise RuntimeError(
467
+ f"{cls.__name__} import path is not {mpl_path}.\n"
468
+ "Please make sure your Matplotlib installation "
469
+ "is from the same source checkout as boilerplate.py"
470
+ )
471
build_pyplot(pyplot_path)
0 commit comments