Skip to content

Commit bff1432

Browse files
committed
Cleanup version check
1 parent 44c2481 commit bff1432

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jupyter_server/prometheus/metrics.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
except ImportError:
1212
notebook_version_info = None
1313

14-
if not notebook_version_info >= (7,):
14+
if notebook_version_info is not None and notebook_version_info < (7,):
1515
# Jupyter Notebook v6 also defined these metrics. Re-defining them results in a ValueError,
1616
# so we simply re-export them if we are co-existing with the notebook v6 package.
1717
# See https://github.com/jupyter/jupyter_server/issues/209

0 commit comments

Comments
 (0)