Skip to content

Commit

Permalink
Clean up f-strings and unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
VladimirFilonov committed Dec 2, 2024
1 parent 15c029f commit 77cd2ec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@
"""

import sqlalchemy as sa
import sqlalchemy_utils
import sqlmodel
from alembic import op
from sqlalchemy.dialects import mysql, postgresql

# revision identifiers, used by Alembic.
revision = "8d4dc7d44a9c"
Expand Down
2 changes: 0 additions & 2 deletions keep/api/models/db/rule.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
from collections import defaultdict
from copy import deepcopy
from datetime import datetime
from enum import Enum
from itertools import chain
from typing import List, Dict
from uuid import UUID, uuid4

from pydantic import BaseModel
from sqlalchemy.orm.attributes import flag_modified
from sqlmodel import JSON, Column, Field, SQLModel

Expand Down
6 changes: 3 additions & 3 deletions keep/rulesengine/rulesengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def run_rules(
if rule.create_on == "any" or (rule.create_on == "all" and len(rule_groups) == 1):

self.logger.info(
f"Single event is enough, so creating incident"
"Single event is enough, so creating incident"
)

incident = create_incident_for_grouping_rule(
Expand All @@ -109,7 +109,7 @@ def run_rules(
elif rule.create_on == "all":

self.logger.info(
f"Multiple events required for the incident to start"
"Multiple events required for the incident to start"
)

rule_group = self._get_rule_group(rule, session)
Expand All @@ -122,7 +122,7 @@ def run_rules(
):

self.logger.info(
f"All required events are in the system, so creating incident"
"All required events are in the system, so creating incident"
)

incident = create_incident_for_grouping_rule(
Expand Down

0 comments on commit 77cd2ec

Please sign in to comment.