Verified Commit 69d00127 authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Fix flake.

parent 8ba1686e
......@@ -14,7 +14,6 @@ from pydantic import BaseModel
# NOC modules
from noc.core.service.loader import get_service
from ..typing import ValueType
from .base import BaseCDAGNode, ValueType, Category
......
......@@ -22,7 +22,8 @@ class Script(BaseScript):
r"^\s*\d+\s+port\s+(?P<interface>\d+)\s+" r"(?P<mac>\S+)\s+(?P<ip>\d+\S+)", re.MULTILINE
)
rx_line2 = re.compile(
r"^\s*(?P<vlan>\d+)\s+(?P<ip>\d+\S+)\s+(?P<mac>\S+)\s+(?P<interface>\S+\s\d+)\s+", re.MULTILINE
r"^\s*(?P<vlan>\d+)\s+(?P<ip>\d+\S+)\s+(?P<mac>\S+)\s+(?P<interface>\S+\s\d+)\s+",
re.MULTILINE,
)
def execute(self):
......
......@@ -105,7 +105,7 @@ class MetricsService(FastAPIService):
labels = data.get("labels")
if not labels or not si.key_labels:
return
scopes = {f'{l.rsplit("::", 1)[0]}::': l for l in labels}
scopes = {f'{ll.rsplit("::", 1)[0]}::': ll for ll in labels}
for k in si.key_labels:
v = scopes.get(k)
if v is not None:
......
......@@ -12,10 +12,6 @@ import subprocess
import re
from importlib.machinery import SourceFileLoader
import datetime
from shutil import which
# Third-party modules
from typing import Optional, List
# NOC modules
from noc.config import config
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment