Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 4, 2024
1 parent 36e8ad6 commit f1897ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
6 changes: 5 additions & 1 deletion jupyter_server/prometheus/metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@

# New prometheus metrics that do not exist in notebook v6 go here
SERVER_INFO = Info("jupyter_server", "Jupyter Server Version information")
SERVER_EXTENSION_INFO = Info("jupyter_server_extension", "Jupyter Server Extensiom Version Information", ["name", "version", "enabled"])
SERVER_EXTENSION_INFO = Info(
"jupyter_server_extension",
"Jupyter Server Extensiom Version Information",
["name", "version", "enabled"],
)

__all__ = [
"HTTP_REQUEST_DURATION_SECONDS",
Expand Down
6 changes: 2 additions & 4 deletions jupyter_server/serverapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
GatewaySessionManager,
)
from jupyter_server.log import log_request
from jupyter_server.prometheus.metrics import SERVER_INFO, SERVER_EXTENSION_INFO
from jupyter_server.prometheus.metrics import SERVER_EXTENSION_INFO, SERVER_INFO
from jupyter_server.services.config import ConfigManager
from jupyter_server.services.contents.filemanager import (
AsyncFileContentsManager,
Expand Down Expand Up @@ -2705,9 +2705,7 @@ def init_metrics(self) -> None:

for k, ext in self.extension_manager.extensions.items():
SERVER_EXTENSION_INFO.labels(
name=ext.name,
version=ext.version,
enabled=str(ext.enabled).lower()
name=ext.name, version=ext.version, enabled=str(ext.enabled).lower()
)

@catch_config_error
Expand Down

0 comments on commit f1897ad

Please sign in to comment.