Skip to content

Commit 0c874ce

Browse files
author
Vianpyro
committed
Refactor imports in person.py and define __all__ in utils.py for better module management
1 parent eb2926f commit 0c874ce

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

.github/workflows/pytest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: Pytest CI
22

33
on:
44
push:
5-
branches:
6-
- main
5+
# branches:
6+
# - main
77
pull_request:
88

99
jobs:

routes/person.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
from argon2 import exceptions
22
from flask import Blueprint, jsonify, request
33

4-
from utils import (
5-
database_cursor,
6-
decrypt_email,
7-
encrypt_email,
8-
hash_email,
9-
hash_password,
10-
mask_email,
11-
validate_password,
12-
verify_password,
13-
)
4+
from utils import *
145

156
person_blueprint = Blueprint("person", __name__)
167

utils.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@
1212

1313
from db import get_db_connection
1414

15+
__all__ = [
16+
"database_cursor",
17+
"decrypt_email",
18+
"encrypt_email",
19+
"hash_email",
20+
"hash_password",
21+
"mask_email",
22+
"validate_password",
23+
"verify_password",
24+
]
25+
1526
load_dotenv()
1627
ph = PasswordHasher()
1728
AES_KEY = bytes.fromhex(os.getenv("AES_SECRET_KEY", os.urandom(32).hex()))

0 commit comments

Comments
 (0)