Format Python code and mark release script executable
This commit is contained in:
@@ -7,9 +7,11 @@ from sqlalchemy.orm import DeclarativeBase
|
|||||||
|
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
||||||
|
|
||||||
class Base(DeclarativeBase):
|
class Base(DeclarativeBase):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
database_url = URL.create(
|
database_url = URL.create(
|
||||||
drivername="mysql+pymysql",
|
drivername="mysql+pymysql",
|
||||||
username=os.getenv("MYSQL_USER"),
|
username=os.getenv("MYSQL_USER"),
|
||||||
|
|||||||
+1
-4
@@ -10,8 +10,5 @@ def get_session():
|
|||||||
with Session(engine, expire_on_commit=False) as session:
|
with Session(engine, expire_on_commit=False) as session:
|
||||||
yield session
|
yield session
|
||||||
|
|
||||||
SessionDep = Annotated[
|
|
||||||
Session,
|
|
||||||
Depends(get_session)
|
|
||||||
]
|
|
||||||
|
|
||||||
|
SessionDep = Annotated[Session, Depends(get_session)]
|
||||||
|
|||||||
Reference in New Issue
Block a user