mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-25 19:15:18 +02:00
chore: ran linting
This commit is contained in:
parent
78a3c71bb5
commit
fe07de3f9c
7 changed files with 21 additions and 11 deletions
|
|
@ -92,7 +92,9 @@ async def _load_target(
|
|||
select(User).where(User.id == _normalize_user_id(target_id)) # type: ignore[arg-type]
|
||||
)
|
||||
return result.scalars().first()
|
||||
result = await session.execute(select(SearchSpace).where(SearchSpace.id == int(target_id)))
|
||||
result = await session.execute(
|
||||
select(SearchSpace).where(SearchSpace.id == int(target_id))
|
||||
)
|
||||
return result.scalars().first()
|
||||
|
||||
|
||||
|
|
@ -141,7 +143,9 @@ async def save_memory(
|
|||
if target is None:
|
||||
return SaveResult(
|
||||
status="error",
|
||||
message="User not found." if normalized is MemoryScope.USER else "Search space not found.",
|
||||
message="User not found."
|
||||
if normalized is MemoryScope.USER
|
||||
else "Search space not found.",
|
||||
)
|
||||
|
||||
old_memory = _get_memory(target, normalized)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@ MEMORY_HARD_LIMIT = 25_000
|
|||
_SECTION_HEADING_RE = re.compile(r"^##\s+(.+)$", re.MULTILINE)
|
||||
_HEADING_LINE_RE = re.compile(r"^##\s+\S+", re.MULTILINE)
|
||||
_HEADING_NORMALIZE_RE = re.compile(r"[^a-z0-9]+")
|
||||
_LEGACY_BULLET_RE = re.compile(r"^-\s+\(\d{4}-\d{2}-\d{2}\)\s+\[(fact|pref|instr)\]\s+.+$")
|
||||
_LEGACY_BULLET_RE = re.compile(
|
||||
r"^-\s+\(\d{4}-\d{2}-\d{2}\)\s+\[(fact|pref|instr)\]\s+.+$"
|
||||
)
|
||||
_NEW_BULLET_RE = re.compile(r"^-\s+\d{4}-\d{2}-\d{2}:\s+.+$")
|
||||
|
||||
_FORBIDDEN_TEAM_HEADINGS = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue