cleanup/rm pylint ignores
This commit is contained in:
@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env python3.12
|
||||
# pylint: disable=bare-except, broad-exception-caught, invalid-name
|
||||
|
||||
import logging
|
||||
import regex
|
||||
@ -12,7 +11,7 @@ from fastapi.responses import JSONResponse
|
||||
class AI(FastAPI):
|
||||
"""AI Endpoints"""
|
||||
def __init__(self, app: FastAPI,
|
||||
my_util, constants): # pylint: disable=super-init-not-called
|
||||
my_util, constants):
|
||||
self.app: FastAPI = app
|
||||
self.util = my_util
|
||||
self.constants = constants
|
||||
@ -50,7 +49,7 @@ class AI(FastAPI):
|
||||
timeout=ClientTimeout(connect=15, sock_read=30)) as out_request:
|
||||
response = await out_request.json()
|
||||
return JSONResponse(content=response)
|
||||
except Exception as e: # pylint: disable=broad-exception-caught
|
||||
except Exception as e:
|
||||
logging.error("Error: %s", e)
|
||||
return JSONResponse(status_code=500, content={
|
||||
'err': True,
|
||||
@ -84,7 +83,7 @@ class AI(FastAPI):
|
||||
timeout=ClientTimeout(connect=15, sock_read=30)) as out_request:
|
||||
response = await out_request.json()
|
||||
return JSONResponse(content=response)
|
||||
except Exception as e: # pylint: disable=broad-exception-caught
|
||||
except Exception as e:
|
||||
logging.error("Error: %s", e)
|
||||
return JSONResponse(status_code=500, content={
|
||||
'err': True,
|
||||
|
@ -50,7 +50,7 @@ class ValidArtistSearchRequest(BaseModel):
|
||||
|
||||
a: str
|
||||
|
||||
class Config: # pylint: disable=missing-class-docstring
|
||||
class Config:
|
||||
schema_extra = {
|
||||
"example": {
|
||||
"a": "eminem"
|
||||
@ -66,7 +66,7 @@ class ValidAlbumDetailRequest(BaseModel):
|
||||
a: str
|
||||
release: str
|
||||
|
||||
class Config: # pylint: disable=missing-class-docstring
|
||||
class Config:
|
||||
schema_extra = {
|
||||
"example": {
|
||||
"a": "eminem",
|
||||
@ -83,7 +83,7 @@ class ValidTrackInfoRequest(BaseModel):
|
||||
a: str
|
||||
t: str
|
||||
|
||||
class Config: # pylint: disable=missing-class-docstring
|
||||
class Config:
|
||||
schema_extra = {
|
||||
"example": {
|
||||
"a": "eminem",
|
||||
|
@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env python3.12
|
||||
# pylint: disable=bare-except, broad-exception-caught
|
||||
|
||||
import os
|
||||
import logging
|
||||
@ -100,7 +99,7 @@ class Karma(FastAPI):
|
||||
"""
|
||||
Karma Endpoints
|
||||
"""
|
||||
def __init__(self, app: FastAPI, util, constants) -> None: # pylint: disable=super-init-not-called
|
||||
def __init__(self, app: FastAPI, util, constants) -> None:
|
||||
self.app: FastAPI = app
|
||||
self.util = util
|
||||
self.constants = constants
|
||||
|
@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env python3.12
|
||||
# pylint: disable=bare-except
|
||||
|
||||
import importlib
|
||||
import traceback
|
||||
@ -12,7 +11,7 @@ from .constructors import ValidArtistSearchRequest, ValidAlbumDetailRequest,\
|
||||
class LastFM(FastAPI):
|
||||
"""Last.FM Endpoints"""
|
||||
def __init__(self, app: FastAPI,
|
||||
util, constants) -> None: # pylint: disable=super-init-not-called
|
||||
util, constants) -> None:
|
||||
self.app: FastAPI = app
|
||||
self.util = util
|
||||
self.constants = constants
|
||||
|
@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env python3.12
|
||||
# pylint: disable=bare-except, broad-exception-raised, broad-exception-caught
|
||||
|
||||
import logging
|
||||
import os
|
||||
@ -46,7 +45,7 @@ class LyricSearch(FastAPI):
|
||||
Lyric Search Endpoint
|
||||
"""
|
||||
def __init__(self, app: FastAPI,
|
||||
util, constants) -> None: # pylint: disable=super-init-not-called
|
||||
util, constants) -> None:
|
||||
self.app: FastAPI = app
|
||||
self.util = util
|
||||
self.constants = constants
|
||||
|
@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env python3.12
|
||||
# pylint: disable=bare-except, broad-exception-caught, invalid-name
|
||||
|
||||
import time
|
||||
import logging
|
||||
@ -14,7 +13,7 @@ class Misc(FastAPI):
|
||||
Misc Endpoints
|
||||
"""
|
||||
def __init__(self, app: FastAPI, my_util,
|
||||
constants, radio) -> None: # pylint: disable=super-init-not-called
|
||||
constants, radio) -> None:
|
||||
self.app: FastAPI = app
|
||||
self.util = my_util
|
||||
self.constants = constants
|
||||
|
@ -12,8 +12,6 @@ from uuid import uuid4 as uuid
|
||||
from typing import Optional
|
||||
from fastapi import FastAPI, BackgroundTasks, Request, Response, HTTPException
|
||||
from fastapi.responses import RedirectResponse, JSONResponse
|
||||
# pylint: disable=bare-except, broad-exception-caught, invalid-name
|
||||
|
||||
|
||||
"""
|
||||
TODO:
|
||||
@ -23,7 +21,7 @@ TODO:
|
||||
class Radio(FastAPI):
|
||||
"""Radio Endpoints"""
|
||||
def __init__(self, app: FastAPI,
|
||||
my_util, constants) -> None: # pylint: disable=super-init-not-called
|
||||
my_util, constants) -> None:
|
||||
self.app: FastAPI = app
|
||||
self.util = my_util
|
||||
self.constants = constants
|
||||
|
@ -13,7 +13,7 @@ class RandMsg(FastAPI):
|
||||
Random Message Endpoint
|
||||
"""
|
||||
def __init__(self, app: FastAPI,
|
||||
util, constants) -> None: # pylint: disable=super-init-not-called
|
||||
util, constants) -> None:
|
||||
self.app: FastAPI = app
|
||||
self.util = util
|
||||
self.constants = constants
|
||||
|
@ -11,7 +11,7 @@ class Transcriptions(FastAPI):
|
||||
"""
|
||||
Transcription Endpoints
|
||||
"""
|
||||
def __init__(self, app: FastAPI, util, constants) -> None: # pylint: disable=super-init-not-called
|
||||
def __init__(self, app: FastAPI, util, constants) -> None:
|
||||
self.app: FastAPI = app
|
||||
self.util = util
|
||||
self.constants = constants
|
||||
@ -92,7 +92,7 @@ class Transcriptions(FastAPI):
|
||||
"""
|
||||
show_id: int = int(data.s)
|
||||
episode_id: int = int(data.e)
|
||||
# pylint: disable=line-too-long
|
||||
|
||||
match show_id:
|
||||
case 0:
|
||||
db_path: Union[str, LiteralString] = os.path.join("/usr/local/share",
|
||||
|
@ -6,11 +6,10 @@ from fastapi import FastAPI, Request, HTTPException
|
||||
from fastapi.responses import JSONResponse
|
||||
from aiohttp import ClientSession, ClientTimeout
|
||||
from .constructors import ValidXCRequest
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
class XC(FastAPI):
|
||||
"""XC (CrossComm) Endpoints"""
|
||||
def __init__(self, app: FastAPI, util, constants) -> None: # pylint: disable=super-init-not-called
|
||||
def __init__(self, app: FastAPI, util, constants) -> None:
|
||||
self.app: FastAPI = app
|
||||
self.util = util
|
||||
self.constants = constants
|
||||
|
@ -11,7 +11,7 @@ class YT(FastAPI):
|
||||
YT Endpoints
|
||||
"""
|
||||
def __init__(self, app: FastAPI, util,
|
||||
constants) -> None: # pylint: disable=super-init-not-called
|
||||
constants) -> None:
|
||||
self.app: FastAPI = app
|
||||
self.util = util
|
||||
self.constants = constants
|
||||
|
Reference in New Issue
Block a user