From 00551ab25d6b95cea43ad19661ea053873f3452b Mon Sep 17 00:00:00 2001 From: jgostick Date: Tue, 17 Oct 2023 21:05:33 +0900 Subject: [PATCH] using try/accept to deal with different versions of mpl --- openpnm/models/_doctxt.py | 6 +++++- openpnm/models/geometry/_geodocs.py | 5 ++++- openpnm/models/phase/_phasedocs.py | 6 +++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/openpnm/models/_doctxt.py b/openpnm/models/_doctxt.py index a147515820..1ae293ac61 100644 --- a/openpnm/models/_doctxt.py +++ b/openpnm/models/_doctxt.py @@ -1,4 +1,8 @@ -from matplotlib._docstring import Substitution +try: + from matplotlib._docstring import Substitution +except ModuleNotFoundError: + from matplotlib.docstring import Substitution + __all__ = [ diff --git a/openpnm/models/geometry/_geodocs.py b/openpnm/models/geometry/_geodocs.py index abd0cfd7d2..0943c1ea18 100644 --- a/openpnm/models/geometry/_geodocs.py +++ b/openpnm/models/geometry/_geodocs.py @@ -1,4 +1,7 @@ -from matplotlib._docstring import Substitution +try: + from matplotlib._docstring import Substitution +except ModuleNotFoundError: + from matplotlib.docstring import Substitution __all__ = [ diff --git a/openpnm/models/phase/_phasedocs.py b/openpnm/models/phase/_phasedocs.py index 1ef9504e3b..7279a39b7b 100644 --- a/openpnm/models/phase/_phasedocs.py +++ b/openpnm/models/phase/_phasedocs.py @@ -1,4 +1,8 @@ -from matplotlib._docstring import Substitution +try: + from matplotlib._docstring import Substitution +except ModuleNotFoundError: + from matplotlib.docstring import Substitution + __all__ = [ '_phasedocs',