Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#25)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v2.2.3 → v4.6.0](pre-commit/pre-commit-hooks@v2.2.3...v4.6.0)
- [github.com/PyCQA/isort: 5.6.4 → 5.13.2](PyCQA/isort@5.6.4...5.13.2)
- https://gitlab.com/pycqa/flake8https://github.com/PyCQA/flake8
- [github.com/PyCQA/flake8: 8f9b4931b9a28896fb43edccb23016a7540f5b82 → 7.0.0](PyCQA/flake8@8f9b493...7.0.0)
- [github.com/humitos/mirrors-autoflake: v1.3 → v1.1](humitos/mirrors-autoflake@v1.3...v1.1)
- [github.com/psf/black: 19.10b0 → 24.4.2](psf/black@19.10b0...24.4.2)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored May 5, 2024
1 parent aa87900 commit 4059bac
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ default_language_version:
python: python3.8
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.2.3
rev: v4.6.0
hooks:
- id: check-merge-conflict
- id: check-added-large-files
Expand All @@ -15,27 +15,27 @@ repos:
- id: pretty-format-json
args: ["--autofix", "--allow-missing-credentials"]
- repo: https://github.com/PyCQA/isort
rev: 5.6.4
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://gitlab.com/pycqa/flake8
rev: "8f9b4931b9a28896fb43edccb23016a7540f5b82"
- repo: https://github.com/PyCQA/flake8
rev: "7.0.0"
hooks:
- id: flake8
additional_dependencies: [flake8-print]
files: '\.py$'
args:
- --select=F401,F403,F406,F821,T001,T003
- repo: https://github.com/humitos/mirrors-autoflake
rev: v1.3
rev: v1.1
hooks:
- id: autoflake
files: '\.py$'
exclude: '^\..*'
args: ["--in-place", "--remove-all-unused-imports"]
- repo: https://github.com/psf/black
rev: 19.10b0
rev: 24.4.2
hooks:
- id: black
args: ["--target-version", "py38"]
11 changes: 7 additions & 4 deletions core/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
from schema.hash import Hash
from schema.token import create_access_token

router = APIRouter(prefix="/login", tags=["Authentication"],)
router = APIRouter(
prefix="/login",
tags=["Authentication"],
)


@router.post("/")
Expand All @@ -33,9 +36,9 @@ def login(
Returns:
Hash: Hash
"""
user: schemas.User = db.query(models.User).filter(
models.User.email == request.username
).first()
user: schemas.User = (
db.query(models.User).filter(models.User.email == request.username).first()
)
if not user:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND, detail="Invalid Credentials"
Expand Down

0 comments on commit 4059bac

Please sign in to comment.