Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 18, 2024
1 parent ff1f09a commit 6a5c4d5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
5 changes: 3 additions & 2 deletions integration_tests/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@

app = Robyn(__file__)

logger.logging_file('logs.logs')
logger.logging_file("logs.logs")


@app.get("/")
async def h():
logger.info("Hello logging file")

return "Hello, world!"


Expand Down
4 changes: 1 addition & 3 deletions robyn/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@ def __init__(self):
self.logger = logging.getLogger(__name__)

def logging_file(self, filename: str):


FileOutputHandler = logging.FileHandler(filename)
formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(message)s")
FileOutputHandler.setFormatter(formatter)
self.logger.addHandler(FileOutputHandler)

Expand Down
3 changes: 1 addition & 2 deletions robyn/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ class GlobalMiddleware(NamedTuple):

class BaseRouter(ABC):
@abstractmethod
def add_route(*args) -> Union[Callable, CoroutineType, WebSocket]:
...
def add_route(*args) -> Union[Callable, CoroutineType, WebSocket]: ...


class Router(BaseRouter):
Expand Down
6 changes: 2 additions & 4 deletions robyn/templating.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@


class TemplateInterface(ABC):
def __init__(self):
...
def __init__(self): ...

@abstractmethod
def render_template(self, *args, **kwargs) -> Response:
...
def render_template(self, *args, **kwargs) -> Response: ...


class JinjaTemplate(TemplateInterface):
Expand Down

0 comments on commit 6a5c4d5

Please sign in to comment.