Skip to content

Commit

Permalink
fixup: Format Python code with Black
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed May 2, 2023
1 parent a8658ad commit 5c324bf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/auth/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
@jwt.token_in_blocklist_loader
def check_if_token_in_blacklist(jwt_header, jwt_data) -> bool:
"""
Helper function for checking if a token is present in the database
Helper function for checking if a token is present in the database
revoked token table
Parameters
Expand Down
4 changes: 2 additions & 2 deletions app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@jwt.user_lookup_loader
def user_loader_callback(jwt_header: dict, jwt_data: dict) -> object:
"""
HUser loader function which uses the JWT identity to retrieve a user object.
HUser loader function which uses the JWT identity to retrieve a user object.
Method is called on protected routes
Parameters
Expand Down Expand Up @@ -54,7 +54,7 @@ def set_password(self, password: str):

def check_password(self, password: str) -> bool:
"""
Helper function to verify the password hash agains the password provided
Helper function to verify the password hash agains the password provided
by the user when logging in
Parameters
Expand Down
2 changes: 1 addition & 1 deletion app/tasks/long_running_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def count_seconds(**kwargs: int) -> None:
with app.app_context():
try:
number: int | None = kwargs.get("number")

if number:
_set_task_progress(0)

Expand Down
4 changes: 2 additions & 2 deletions flask_api_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
@app.cli.command()
def remove_old_jwts():
"""
Scan the database for JWT tokens in the Revoked Token table older than 5 days
Scan the database for JWT tokens in the Revoked Token table older than 5 days
and remove them.
"""

# Import within the function to prevent working outside of application context
# Import within the function to prevent working outside of application context
# when calling flask --help
from app.models import RevokedTokenModel

Expand Down

0 comments on commit 5c324bf

Please sign in to comment.