From 377c72832ff1062ec12d5fac2557ecc6d2d64bf3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 29 Oct 2024 04:16:23 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- jupyter_server/prometheus/metrics.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jupyter_server/prometheus/metrics.py b/jupyter_server/prometheus/metrics.py index 2af756e99..479ff5670 100644 --- a/jupyter_server/prometheus/metrics.py +++ b/jupyter_server/prometheus/metrics.py @@ -6,6 +6,7 @@ """ from prometheus_client import Gauge, Histogram, Info + from jupyter_server._version import version_info as server_version_info try: @@ -14,7 +15,11 @@ notebook_version_info = None -if notebook_version_info is not None and notebook_version_info < (7,) and notebook_version_info != server_version_info: +if ( + notebook_version_info is not None + and notebook_version_info < (7,) + and notebook_version_info != server_version_info +): print("yes, we think we have an unshimmed notebook package") print(notebook_version_info) # Jupyter Notebook v6 also defined these metrics. Re-defining them results in a ValueError,