Skip to content

Commit

Permalink
Fix bugs uncovered by flake8 and a typo
Browse files Browse the repository at this point in the history
  • Loading branch information
samuell committed Jul 4, 2024
1 parent 940bb26 commit fd6fbcc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion microSALT/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
sys.exit(-1)


def set_cli_config(config):
@click.pass_context
def set_cli_config(ctx, config):
if config != "":
if os.path.exists(config):
try:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def dbm():
dbm = DB_Manipulator(config=preset_config,log=logger)
dbm.create_tables()

for antry in unpack_db_json('sampleinfo_projects.json'):
dbm.add_rec(antry, 'Projects')
for entry in unpack_db_json('sampleinfo_projects.json'):
dbm.add_rec(entry, 'Projects')
for entry in unpack_db_json('sampleinfo_mlst.json'):
dbm.add_rec(entry, 'Seq_types')
for bentry in unpack_db_json('sampleinfo_resistance.json'):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_paths(exp_config):
for entry in preset_config.keys():
if entry != '_comment':
if isinstance(preset_config[entry], str) and '/' in preset_config[entry] and entry not in ['database', 'genologics']:
unmade_fldr = preset_config[entry][thing]
unmade_fldr = preset_config[entry]
assert (pathlib.Path(unmade_fldr).exists())

#level two
Expand Down

0 comments on commit fd6fbcc

Please sign in to comment.