Skip to content

Commit

Permalink
chore: make format
Browse files Browse the repository at this point in the history
Signed-off-by: Luka Peschke <[email protected]>
  • Loading branch information
lukapeschke committed Jan 14, 2025
1 parent adeae52 commit 13d7f68
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def translate_percentage(step: PercentageStep) -> list[MongoStep]:
"$group": {
"_id": {g: f"${g}" for g in step.group} if step.group else None,
"_vqbAppArray": {"$push": "$$ROOT"},
"_vqbTotalDenum": {"$sum": f"${step.column }"},
"_vqbTotalDenum": {"$sum": f"${step.column}"},
},
},
{"$unwind": "$_vqbAppArray"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ def translate_todate(step: ToDateStep) -> list[MongoStep]:

MONTH_REPLACEMENT_STEP: MongoStep = {
"$addFields": {
"_vqbTempMonth" "$switch": {
"_vqbTempMonth$switch": {
"branches": [
{
"case": {"$in": month_names},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,9 @@ def get_query_builder(
) -> QueryBuilderContext:
if len(steps) <= 0:
raise ValueError("No steps provided")
assert (
steps[0].name == "domain" or steps[0].name == "customsql"
), f"First step must be one of domain or customsql step, got '{steps[0].name}'"
assert steps[0].name == "domain" or steps[0].name == "customsql", (
f"First step must be one of domain or customsql step, got '{steps[0].name}'"
)
self._step_count = 0

# A single custom SQL step must always be wrapped in a CTE, as we cannot apply offset and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def test_translate_evolution() -> None:
"bar_EVOL_ABS": {
"$cond": [
{"$eq": ["$_VQB_VALUE_PREV", "Error"]},
"Error: More than one previous " "date found for the specified " "index columns",
"Error: More than one previous date found for the specified index columns",
{"$subtract": ["$bar", "$_VQB_VALUE_PREV"]},
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"port": 3306,
"database": "mysql_db",
}
_CONNECTION_STRING = f'mysql+pymysql://{_CON_PARAMS["user"]}:{_CON_PARAMS["password"]}@{_CON_PARAMS["host"]}:{_CON_PARAMS["port"]}/{_CON_PARAMS["database"]}'
_CONNECTION_STRING = f"mysql+pymysql://{_CON_PARAMS['user']}:{_CON_PARAMS['password']}@{_CON_PARAMS['host']}:{_CON_PARAMS['port']}/{_CON_PARAMS['database']}"


@pytest.fixture(scope="module")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"port": 5432,
"database": "pg_db",
}
connection_string = f'postgresql://{con_params["user"]}:{con_params["password"]}@{con_params["host"]}:{con_params["port"]}/{con_params["database"]}'
connection_string = f"postgresql://{con_params['user']}:{con_params['password']}@{con_params['host']}:{con_params['port']}/{con_params['database']}"


@pytest.fixture(scope="module")
Expand Down
2 changes: 1 addition & 1 deletion server/tests/steps/test_top.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
def sample_df():
return DataFrame(
{
"Label": [f"Label {i+1}" for i in range(6)],
"Label": [f"Label {i + 1}" for i in range(6)],
"Group": ["Group 1"] * 3 + ["Group 2"] * 3,
"Value": [13, 7, 20, 1, 10, 5],
}
Expand Down

0 comments on commit 13d7f68

Please sign in to comment.