Skip to content

Commit

Permalink
fixed lint
Browse files Browse the repository at this point in the history
Signed-off-by: Prati28 <[email protected]>
  • Loading branch information
psankhe28 committed Aug 15, 2024
1 parent f6fc7a5 commit 1fca403
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
13 changes: 8 additions & 5 deletions tus_storagehandler/app.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
"""API server entry point."""

from enum import Enum
import logging
import os
from enum import Enum
from pathlib import Path
from typing import Optional

from connexion import FlaskApp
from foca import Foca


class Environment(Enum):
"""Defines possible environments for the application."""

DEV = "dev"
PROD = "prod"


from connexion import FlaskApp
from foca import Foca

logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -70,7 +72,8 @@ def main(env: Optional[str] = None) -> None:
env = Environment.DEV.value
elif env not in [e.value for e in Environment]:
raise ValueError(
f"Invalid environment: {env}. Must be one of {[e.value for e in Environment]}"
f"Invalid environment: {env}. Must be one of "
f"{[e.value for e in Environment]}"
)

port = app.port if env == Environment.DEV.value else default_port
Expand Down
3 changes: 2 additions & 1 deletion tus_storagehandler/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"""Tus Storage Handler exceptions."""

from werkzeug.exceptions import BadRequest, InternalServerError, NotFound
from http import HTTPStatus

from werkzeug.exceptions import BadRequest, InternalServerError, NotFound

exceptions = {
Exception: {
"message": "An unexpected error occurred. Please try again.",
Expand Down

0 comments on commit 1fca403

Please sign in to comment.