From fed3312bc73437243bf111e1a68ea6f97d913448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Sat, 16 Jul 2022 11:19:11 +0200 Subject: [PATCH] ENH: cleanup unnecessary try block in __init__.py --- unyt/__init__.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/unyt/__init__.py b/unyt/__init__.py index a4b0a6df..43f79ad8 100644 --- a/unyt/__init__.py +++ b/unyt/__init__.py @@ -68,13 +68,6 @@ from ._version import get_versions -try: - from unyt.mpl_interface import matplotlib_support # NOQA: F401 -except ImportError: - pass -else: - matplotlib_support = matplotlib_support() - # function to only import quantities into this namespace # we go through the trouble of doing this instead of "import *" @@ -107,3 +100,9 @@ def test(): # pragma: no cover import pytest pytest.main([os.path.dirname(os.path.abspath(__file__))]) + + +# isort: off +from unyt.mpl_interface import matplotlib_support + +matplotlib_support = matplotlib_support()