Skip to content

Commit 251102c

Browse files
committed
lint
1 parent 1d56a49 commit 251102c

File tree

5 files changed

+25
-9
lines changed

5 files changed

+25
-9
lines changed

genie_registry/bed.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,4 +715,4 @@ def _validate(self, beddf):
715715
total_error += error
716716
warning += warn
717717

718-
return (total_error, warning)
718+
return (total_error, warning)

genie_registry/clinical.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,4 +1336,4 @@ def _cross_validate(self, clinicaldf) -> tuple:
13361336

13371337
errors = errors_assay + errors_bed
13381338
warnings = warnings_assay + warnings_bed
1339-
return errors, warnings
1339+
return errors, warnings

genie_registry/cna.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,4 +243,4 @@ def _validate(self, cnvDF, nosymbol_check):
243243
",".join(cnvDF["remapped"][duplicated]),
244244
)
245245
)
246-
return (total_error, warning)
246+
return (total_error, warning)

genie_registry/mutationsInCis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,4 @@ def _validate(self, mutationInCisDf):
115115
)
116116
total_error += error
117117

118-
return total_error, warning
118+
return total_error, warning

tests/test_load.py

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def test_store_database_with_rows_to_update_and_delete(syn):
221221
):
222222
load.store_database(syn, database_synid, all_updates, to_delete_rows)
223223
patch_get.assert_called_once_with(database_synid)
224-
patch_store_rows.assert_called_once_with(values =all_updates)
224+
patch_store_rows.assert_called_once_with(values=all_updates)
225225
patch_delete_rows.assert_called_once_with(df=to_delete_rows)
226226
patch_info.assert_has_calls(
227227
[
@@ -253,7 +253,7 @@ def test_store_database_only_rows_to_update(syn):
253253
):
254254
load.store_database(syn, database_synid, all_updates, to_delete_rows)
255255
patch_get.assert_called_once_with(database_synid)
256-
patch_store_rows.assert_called_once_with(values =all_updates)
256+
patch_store_rows.assert_called_once_with(values=all_updates)
257257
patch_delete_rows.assert_not_called()
258258
patch_info.assert_called_once_with(
259259
f"Upserting {len(all_updates)} rows from {mock_database_ent.name} table"
@@ -323,16 +323,32 @@ def test_that_update_table_has_expected_calls(
323323
syn, cols_subset, to_delete, subsetted_data
324324
):
325325
test_table_synid = "synZZZ"
326-
test_data = pd.DataFrame({"ROW_ID": ["1"], "ROW_VERSION": ["1"], "CENTER": ["test-center"], "data": [123]})
327-
test_new_data = pd.DataFrame({"ROW_ID": ["1"], "ROW_VERSION": ["1"], "CENTER": ["test-center"], "data": [123]})
326+
test_data = pd.DataFrame(
327+
{
328+
"ROW_ID": ["1"],
329+
"ROW_VERSION": ["1"],
330+
"CENTER": ["test-center"],
331+
"data": [123],
332+
}
333+
)
334+
test_new_data = pd.DataFrame(
335+
{
336+
"ROW_ID": ["1"],
337+
"ROW_VERSION": ["1"],
338+
"CENTER": ["test-center"],
339+
"data": [123],
340+
}
341+
)
328342

329343
mock_database_ent = Mock()
330344
mock_database_ent.primaryKey = "PRIMARY_KEY"
331345
mock_database = Mock()
332346

333347
with (
334348
patch.object(syn, "get", return_value=mock_database_ent),
335-
patch("synapseclient.models.mixins.table_components.QueryMixin.query_async", return_value=test_data
349+
patch(
350+
"synapseclient.models.mixins.table_components.QueryMixin.query_async",
351+
return_value=test_data,
336352
) as patch_table_query,
337353
patch.object(load, "_update_table") as patch__update_table,
338354
):

0 commit comments

Comments
 (0)