Skip to content

Commit

Permalink
refactor: remove unused "merge" parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
newgene committed Jun 15, 2023
1 parent 092be76 commit 1c4e59d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 20 deletions.
18 changes: 9 additions & 9 deletions biothings/management/dataplugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,14 +144,14 @@ def inspect_source(
""",
),
] = None,
merge: Annotated[
Optional[bool],
typer.Option(
"--merge",
"-m",
help="""Merge scalar into list when both exist (eg. {"val":..} and [{"val":...}])""",
),
] = False,
# merge: Annotated[
# Optional[bool],
# typer.Option(
# "--merge",
# "-m",
# help="""Merge scalar into list when both exist (eg. {"val":..} and [{"val":...}])""",
# ),
# ] = False,
output: Annotated[
Optional[str],
typer.Option(
Expand All @@ -166,7 +166,7 @@ def inspect_source(
sub_source_name=sub_source_name,
mode=mode,
limit=limit,
merge=merge,
merge=False,
output=output,
logger=logger,
)
Expand Down
18 changes: 9 additions & 9 deletions biothings/management/dataplugin_localhub.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,14 @@ def inspect_source(
""",
),
] = None,
merge: Annotated[
Optional[bool],
typer.Option(
"--merge",
"-m",
help="""Merge scalar into list when both exist (eg. {"val":..} and [{"val":...}])""",
),
] = False,
# merge: Annotated[
# Optional[bool],
# typer.Option(
# "--merge",
# "-m",
# help="""Merge scalar into list when both exist (eg. {"val":..} and [{"val":...}])""",
# ),
# ] = False,
output: Annotated[
Optional[str],
typer.Option(
Expand All @@ -182,7 +182,7 @@ def inspect_source(
sub_source_name=sub_source_name,
mode=mode,
limit=limit,
merge=merge,
merge=False,
output=output,
logger=logger,
)
Expand Down
2 changes: 0 additions & 2 deletions biothings/utils/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,9 @@ def merge_scalar_list(mapt, mode):
pass
# explore further
merge_scalar_list(mapt[list], mode)
# elif type(mapt) == dict: # TODO: remove this line
elif isinstance(mapt, dict):
for k in mapt:
merge_scalar_list(mapt[k], mode)
# elif type(mapt) == list: # TODO: remove this line
elif isinstance(mapt, list):
for e in mapt:
merge_scalar_list(e, mode)
Expand Down

0 comments on commit 1c4e59d

Please sign in to comment.