Skip to content

Commit

Permalink
Address LGTM alerts
Browse files Browse the repository at this point in the history
  • Loading branch information
jwodder committed Jun 7, 2021
1 parent 8aa9f7f commit 2d09ba7
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dandi/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ def get_versions():
# versionfile_source is the relative path from the top of the source
# tree (where the .git directory might live) to this file. Invert
# this to find the root from __file__.
for i in cfg.versionfile_source.split('/'):
for _ in cfg.versionfile_source.split('/'):
root = os.path.dirname(root)
except NameError:
return {"version": "0+unknown", "full-revisionid": None,
Expand Down
2 changes: 1 addition & 1 deletion dandi/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
import mpi4py

mpi4py.rc(initialize=False)
except:
except Exception:
pass
2 changes: 0 additions & 2 deletions dandi/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ def get_metadata(path):
break
except KeyError as exc: # ATM there is
lgr.debug("Failed to read %s: %s", path, exc)
import re

res = re.match(r"^['\"\\]+(\S+). not a namespace", str(exc))
if not res:
raise
Expand Down
4 changes: 0 additions & 4 deletions tools/validate-api-against-girder.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
#!/usr/bin/env python3
import click
import requests

from dandi.dandiapi import DandiAPIClient
from dandi.dandiset import APIDandiset
from dandi.girder import GirderCli


def adhoc_list_girder(_id, client, prefix=""):
"""Pure girder API has no recursive listing, so let's do it manually"""
res = list()
ret = []
for r in client.listItem(_id):
assert r.get("_modelType", None) == "item"
f = list(client.listFile(r["_id"]))
Expand Down

0 comments on commit 2d09ba7

Please sign in to comment.