File tree Expand file tree Collapse file tree 6 files changed +48
-17
lines changed Expand file tree Collapse file tree 6 files changed +48
-17
lines changed Original file line number Diff line number Diff line change
1
+ name : Reformat code
2
+
3
+ on : push
4
+
5
+ permissions :
6
+ contents : write
7
+
8
+ jobs :
9
+ reformat-code :
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - uses : actions/checkout@v4
14
+
15
+ - name : Set up Python
16
+ uses : actions/setup-python@v5
17
+ with :
18
+ python-version : " 3.12"
19
+ architecture : " x64"
20
+ - name : Display Python version
21
+ run : python -c "import sys; print(sys.version)"
22
+
23
+ - name : Setup poetry and dev requirements
24
+ run : |
25
+ pip install poetry
26
+ poetry install --with dev
27
+
28
+ - name : Reformat code
29
+ run : make ref
30
+
31
+ - uses : EndBug/add-and-commit@v9
32
+ with :
33
+ default_author : github_actions
Original file line number Diff line number Diff line change 1
1
"""
2
- Dependencies
2
+ Dependency annotations
3
3
"""
4
4
5
5
from typing import Annotated
Original file line number Diff line number Diff line change 8
8
from fastapi .security import APIKeyHeader
9
9
10
10
from app .core .db import Database , SessionLocal
11
- from app .core .logic import Logic
12
11
from app .core .security import Security
12
+ from app .logic import Logic
13
13
from app .models .user import User
14
14
15
15
Original file line number Diff line number Diff line change 8
8
USER_EXISTS = HTTPException (status .HTTP_409_CONFLICT , 'User is already taken.' )
9
9
USER_NOT_FOUND = HTTPException (status .HTTP_404_NOT_FOUND , 'User not found.' )
10
10
USER_IS_CORRECT = HTTPException (
11
- status .HTTP_401_UNAUTHORIZED , 'User is correct'
11
+ status .HTTP_401_UNAUTHORIZED , 'User is correct. '
12
12
)
13
13
14
14
# Tokens
15
- TOKEN_INVALID = HTTPException (status .HTTP_401_UNAUTHORIZED , 'Invalid token' )
16
- TOKEN_EXPIRED = HTTPException (status .HTTP_401_UNAUTHORIZED , 'Token expired' )
15
+ TOKEN_INVALID = HTTPException (status .HTTP_401_UNAUTHORIZED , 'Invalid token. ' )
16
+ TOKEN_EXPIRED = HTTPException (status .HTTP_401_UNAUTHORIZED , 'Token expired. ' )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ from app .core .db import Database
2
+ from app .core .security import Security
3
+
1
4
from .users import Users
2
5
3
- __all__ = ['Users' ]
6
+
7
+ class Logic :
8
+ def __init__ (self , db : Database , security : Security ):
9
+ self .users = Users (db , security )
10
+
11
+
12
+ __all__ = ['Logic' ]
You can’t perform that action at this time.
0 commit comments