style: format code using black
This commit is contained in:
parent
9c9b06e13e
commit
bd76971312
|
@ -86,7 +86,9 @@ def process_http_requests(ipc_queue, http_retry_queue_path):
|
|||
with open(http_retry_queue_path, "wb") as pickle_file:
|
||||
pickle.dump(retry_queue, pickle_file)
|
||||
return
|
||||
except Exception as exception: # Terrible top-level exception handler to prevent the thread from dying, just in case.
|
||||
except (
|
||||
Exception
|
||||
) as exception: # Terrible top-level exception handler to prevent the thread from dying, just in case.
|
||||
if shutdown:
|
||||
return
|
||||
logger.exception(f"Unhandled exception in StatusReporter {exception}")
|
||||
|
|
|
@ -47,7 +47,6 @@ class StatsCollector:
|
|||
self,
|
||||
output: AnyOutput,
|
||||
) -> Dict[str, Stats]:
|
||||
|
||||
response = self._session.get(
|
||||
url=self.get_output_url(output),
|
||||
auth=(output.admin_user, output.admin_password),
|
||||
|
|
|
@ -235,7 +235,6 @@ class PypoFetch(Thread):
|
|||
|
||||
# Download all the media and put playlists in liquidsoap "annotate" format
|
||||
try:
|
||||
|
||||
# Make sure cache_dir exists
|
||||
download_dir = self.cache_dir
|
||||
try:
|
||||
|
|
|
@ -28,7 +28,6 @@ def create_liquidsoap_annotation(media):
|
|||
# with the metadata we get from Airtime. (You can modify metadata in Airtime's library,
|
||||
# which doesn't get saved back to the file.)
|
||||
if "metadata" in media:
|
||||
|
||||
if "artist_name" in media["metadata"]:
|
||||
artist_name = media["metadata"]["artist_name"]
|
||||
if isinstance(artist_name, str):
|
||||
|
|
|
@ -118,7 +118,6 @@ class ShowRecorder(Thread):
|
|||
return self.p is not None
|
||||
|
||||
def upload_file(self, filepath):
|
||||
|
||||
filename = os.path.split(filepath)[1]
|
||||
|
||||
# files is what requests actually expects
|
||||
|
|
|
@ -64,6 +64,7 @@ class GeneralConfig(BaseModel):
|
|||
# StorageConfig
|
||||
########################################################################################
|
||||
|
||||
|
||||
# pylint: disable=too-few-public-methods
|
||||
class StorageConfig(BaseModel):
|
||||
path: str = "/srv/libretime"
|
||||
|
@ -75,6 +76,7 @@ class StorageConfig(BaseModel):
|
|||
# DatabaseConfig
|
||||
########################################################################################
|
||||
|
||||
|
||||
# pylint: disable=too-few-public-methods
|
||||
class DatabaseConfig(BaseModel):
|
||||
host: str = "localhost"
|
||||
|
@ -94,6 +96,7 @@ class DatabaseConfig(BaseModel):
|
|||
# RabbitMQConfig
|
||||
########################################################################################
|
||||
|
||||
|
||||
# pylint: disable=too-few-public-methods
|
||||
class RabbitMQConfig(BaseModel):
|
||||
host: str = "localhost"
|
||||
|
|
|
@ -21,6 +21,7 @@ AnyOutput = Annotated[
|
|||
Field(discriminator="kind"),
|
||||
]
|
||||
|
||||
|
||||
# pylint: disable=too-few-public-methods
|
||||
class FixtureConfig(BaseConfig):
|
||||
public_url: AnyHttpUrl
|
||||
|
|
|
@ -39,7 +39,6 @@ for setup in glob("*/setup.py"):
|
|||
and isinstance(node.value.func, ast.Name)
|
||||
and node.value.func.id == "setup"
|
||||
):
|
||||
|
||||
for keyword in node.value.keywords:
|
||||
if keyword.arg == "install_requires":
|
||||
requires.extend(ast.literal_eval(keyword.value))
|
||||
|
|
Loading…
Reference in New Issue