Skip to content

Commit

Permalink
Run backend linter
Browse files Browse the repository at this point in the history
  • Loading branch information
carolynzhang18 committed Apr 8, 2024
1 parent 621ef96 commit 12fa6c8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
22 changes: 11 additions & 11 deletions backend/python/app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ def create_app(config_name):
)

if os.getenv("FLASK_CONFIG") != "production":
app.config[
"SQLALCHEMY_DATABASE_URI"
] = "postgresql://{username}:{password}@{host}:5432/{db}".format(
username=os.getenv("POSTGRES_USER"),
password=os.getenv("POSTGRES_PASSWORD"),
host=os.getenv("DB_HOST"),
db=(
os.getenv("POSTGRES_DB_TEST")
if app.config["TESTING"]
else os.getenv("POSTGRES_DB_DEV")
),
app.config["SQLALCHEMY_DATABASE_URI"] = (
"postgresql://{username}:{password}@{host}:5432/{db}".format(
username=os.getenv("POSTGRES_USER"),
password=os.getenv("POSTGRES_PASSWORD"),
host=os.getenv("DB_HOST"),
db=(
os.getenv("POSTGRES_DB_TEST")
if app.config["TESTING"]
else os.getenv("POSTGRES_DB_DEV")
),
)
)
else:
app.config["SQLALCHEMY_DATABASE_URI"] = os.getenv("DATABASE_URL")
Expand Down
1 change: 1 addition & 0 deletions backend/python/app/rest/entity_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
# defines a shared URL prefix for all routes
blueprint = Blueprint("entity", __name__, url_prefix="/entities")


# defines GET endpoint for retrieving all entities
@blueprint.route("/", methods=["GET"], strict_slashes=False)
@require_authorization_by_role({"User", "Admin"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2021-08-16 04:55:26.406967
"""

from alembic import op
import sqlalchemy as sa

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2021-06-13 17:16:55.426036
"""

from alembic import op
import sqlalchemy as sa

Expand Down

0 comments on commit 12fa6c8

Please sign in to comment.