cleanup/rm
This commit is contained in:
parent
a1484c572c
commit
119f40daf8
2
base.py
2
base.py
@ -8,8 +8,6 @@ from fastapi import FastAPI, Request
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from lyric_search.sources import redis_cache
|
||||
|
||||
|
||||
|
||||
logger = logging.getLogger()
|
||||
logger.setLevel(logging.INFO)
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
import logging
|
||||
import regex
|
||||
from regex import Pattern
|
||||
|
@ -1,11 +1,6 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
from typing import Optional
|
||||
from pydantic import BaseModel
|
||||
|
||||
# Constructors
|
||||
# TODO: REORDER
|
||||
|
||||
"""
|
||||
Karma
|
||||
"""
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
import os
|
||||
import logging
|
||||
import time
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
import importlib
|
||||
import traceback
|
||||
from typing import Optional, Union
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
import logging
|
||||
import os
|
||||
import urllib.parse
|
||||
|
@ -1,7 +1,4 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
import time
|
||||
import logging
|
||||
from typing import Optional
|
||||
from fastapi import FastAPI
|
||||
from fastapi.responses import JSONResponse
|
||||
@ -86,7 +83,7 @@ class Misc(FastAPI):
|
||||
"""
|
||||
Homepage Lyrics Widget Handler
|
||||
"""
|
||||
found_counts: dict = await self.redis_cache.get_found_counts()
|
||||
found_counts: Optional[dict] = await self.redis_cache.get_found_counts()
|
||||
if not isinstance(found_counts, dict):
|
||||
return JSONResponse(status_code=500, content={
|
||||
'err': True,
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
import logging
|
||||
import traceback
|
||||
import time
|
||||
|
@ -1,9 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
"""
|
||||
Radio Utils
|
||||
"""
|
||||
|
||||
import logging
|
||||
import traceback
|
||||
import time
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
import os
|
||||
import random
|
||||
from typing import LiteralString, Optional, Union
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
import os
|
||||
import aiosqlite as sqlite3
|
||||
from fastapi import FastAPI
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
import logging
|
||||
from typing import Optional
|
||||
from fastapi import FastAPI, Request, HTTPException
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
import importlib
|
||||
from fastapi import FastAPI
|
||||
from fastapi.responses import JSONResponse
|
||||
|
@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
from typing import Optional
|
||||
from openai import AsyncOpenAI
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
import traceback
|
||||
import logging
|
||||
from typing import Optional, Union
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
from dataclasses import dataclass
|
||||
from typing import Union
|
||||
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
from typing import Optional
|
||||
from lyric_search.constructors import LyricsResult
|
||||
from lyric_search import notifier
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
import os
|
||||
import time
|
||||
import regex
|
||||
|
@ -1,4 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
SCRAPE_HEADERS: dict[str, str] = {
|
||||
'accept': '*/*',
|
||||
'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0',
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
import sys
|
||||
sys.path.insert(1,'..')
|
||||
import traceback
|
||||
@ -7,7 +5,7 @@ import logging
|
||||
import time
|
||||
from typing import Optional
|
||||
from aiohttp import ClientTimeout, ClientSession
|
||||
from bs4 import BeautifulSoup, ResultSet
|
||||
from bs4 import BeautifulSoup, ResultSet # type: ignore
|
||||
import html as htm
|
||||
from . import private, common, cache, redis_cache
|
||||
from lyric_search import utils
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
import sys
|
||||
import time
|
||||
sys.path.insert(1,'..')
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
import logging
|
||||
import traceback
|
||||
import json
|
||||
@ -35,7 +33,7 @@ class RedisCache:
|
||||
def __init__(self) -> None:
|
||||
self.redis_client: redis.Redis = redis.Redis(password=private.REDIS_PW)
|
||||
self.notifier = notifier.DiscordNotifier()
|
||||
self.notify_warnings = True
|
||||
self.notify_warnings = False
|
||||
self.regexes: list[Pattern] = [
|
||||
regex.compile(r'\-'),
|
||||
regex.compile(r'[^a-zA-Z0-9\s]'),
|
||||
|
@ -1,5 +1,3 @@
|
||||
#!/usr/bin/env python3.12
|
||||
|
||||
from difflib import SequenceMatcher
|
||||
from typing import List, Optional, Union, Any
|
||||
import logging
|
||||
|
Loading…
x
Reference in New Issue
Block a user