Skip to content

Commit 966e205

Browse files
committed
[build] Meet lint rules
1 parent edf7584 commit 966e205

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

bindings/pyroot/pythonizations/python/ROOT/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
import types
1919
from importlib.abc import Loader, MetaPathFinder
2020
from importlib.machinery import ModuleSpec
21-
from importlib.metadata import version
22-
from importlib.metadata import PackageNotFoundError
21+
from importlib.metadata import PackageNotFoundError, version
2322

2423
from . import _asan # noqa: F401 # imported for side effects for setup specific to AddressSanitizer environments
2524
from ._facade import ROOTFacade
@@ -204,7 +203,7 @@ def find_spec(self, fullname: str, path, target=None) -> ModuleSpec:
204203
"Do not rely on this distribution for production purposes.",
205204
stacklevel=2, # emit the warning in the caller
206205
)
207-
except:
206+
except PackageNotFoundError:
208207
pass
209208

210209
def _cleanup():

0 commit comments

Comments
 (0)