Skip to content

Commit 1d503be

Browse files
committed
add reformat code
. . . . . Commit from GitHub Actions (Reformat code)
1 parent b8bd221 commit 1d503be

File tree

6 files changed

+48
-17
lines changed

6 files changed

+48
-17
lines changed

.github/workflows/reformat-code.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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

app/api/anotations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Dependencies
2+
Dependency annotations
33
"""
44

55
from typing import Annotated

app/core/deps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
from fastapi.security import APIKeyHeader
99

1010
from app.core.db import Database, SessionLocal
11-
from app.core.logic import Logic
1211
from app.core.security import Security
12+
from app.logic import Logic
1313
from app.models.user import User
1414

1515

app/core/exps.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
USER_EXISTS = HTTPException(status.HTTP_409_CONFLICT, 'User is already taken.')
99
USER_NOT_FOUND = HTTPException(status.HTTP_404_NOT_FOUND, 'User not found.')
1010
USER_IS_CORRECT = HTTPException(
11-
status.HTTP_401_UNAUTHORIZED, 'User is correct'
11+
status.HTTP_401_UNAUTHORIZED, 'User is correct.'
1212
)
1313

1414
# 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.')

app/core/logic.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

app/logic/__init__.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
from app.core.db import Database
2+
from app.core.security import Security
3+
14
from .users import Users
25

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']

0 commit comments

Comments
 (0)