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 6d0a267 commit 5206e7d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions comps/cores/mega/http_service.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (C) 2024 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

import re
from typing import Optional

from fastapi import FastAPI
Expand All @@ -9,7 +10,7 @@

from .base_service import BaseService
from .base_statistics import collect_all_statistics
import re


class HTTPService(BaseService):
"""FastAPI HTTP service based on BaseService class.
Expand Down Expand Up @@ -37,7 +38,7 @@ def __init__(
# remove part before '@', used by register_microservice() callers, and
# part after '/', added by MicroService(), to get real service name, and
# convert invalid characters to '_'
suffix = re.sub(r'[^a-zA-Z0-9]', '_', self.title.split("/")[0].split("@")[-1].lower())
suffix = re.sub(r"[^a-zA-Z0-9]", "_", self.title.split("/")[0].split("@")[-1].lower())

instrumentator = Instrumentator(
inprogress_name=f"http_requests_inprogress_{suffix}",
Expand Down

0 comments on commit 5206e7d

Please sign in to comment.