Skip to content

Commit 8951d7d

Browse files
committed
Resolve a few cleanliness concerns after merging
Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
1 parent fb49421 commit 8951d7d

6 files changed

Lines changed: 1051 additions & 7 deletions

File tree

csp_bot/bot.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
"""
1212

1313
import asyncio
14+
import html
15+
import re
1416
import threading
1517
import time
1618
from csv import reader
@@ -487,9 +489,6 @@ def _is_message_to_bot(self, msg: Message, backend: str) -> Tuple[bool, str, str
487489
content = msg._parse_symphony_content(raw_content)
488490
else:
489491
# Manual HTML stripping for non-SymphonyMessage
490-
import html
491-
import re
492-
493492
content = raw_content
494493
content = re.sub(r"<br\s*/?>\s*", "\n", content, flags=re.IGNORECASE)
495494
content = re.sub(r"</p>\s*", "\n", content, flags=re.IGNORECASE)

csp_bot/bot_config.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@
66

77
from typing import List, Optional, Set
88

9-
from pydantic import Field
10-
119
from ccflow import BaseModel
10+
from pydantic import Field
1211

1312
from .backends import (
1413
DiscordConfig as ChatomDiscordConfig,

0 commit comments

Comments
 (0)