Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cassidysymons committed Jan 22, 2025
1 parent 186980b commit e91fc91
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions microsetta_private_api/repo/metadata_repo/_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def drop_private_columns(df):
# sensitive in nature
pm_remove = {c.lower() for c in df.columns if c.lower().startswith('pm_')}

freetext_fields = {c.lower () for c in _get_freetext_fields()}
freetext_fields = {c.lower() for c in _get_freetext_fields()}

remove = pm_remove | {c.lower() for c in EBI_REMOVE} | freetext_fields
to_drop = [c for c in df.columns if c.lower() in remove]
Expand Down Expand Up @@ -640,7 +640,7 @@ def _find_duplicates(barcodes):

def _get_freetext_fields():
""" Retrieve a list of all free-text survey fields from the database
Returns
-------
list of str
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def test_drop_private_columns(self):
obs = drop_private_columns(df)
pdt.assert_frame_equal(obs, exp)

def test_drop_private_columns(self):
def test_drop_private_columns_freetext(self):
# This test specifically asserts that the new code to drop free-text
# fields works, even if those fields are not represented in the
# EBI_REMOVE list
Expand Down

0 comments on commit e91fc91

Please sign in to comment.