Skip to content

Commit

Permalink
Fix flake8 issues in dev from anndata PR
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Sep 17, 2020
1 parent fc498ec commit cc73b3b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/galaxy/datatypes/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -963,7 +963,7 @@ class Anndata(H5):
MetadataElement(name="varm_count", default=0, desc="varm_count", readonly=True, visible=True, no_value=0)
MetadataElement(name="uns_layers", desc="uns_layers", default=[], param=metadata.SelectParameter, multiple=True, readonly=True, no_value=None)
MetadataElement(name="uns_count", default=0, desc="uns_count", readonly=True, visible=True, no_value=0)
MetadataElement(name="shape", default=(), desc="shape", param=metadata.ListParameter, readonly=True, visible=True, no_value=(0,0))
MetadataElement(name="shape", default=(), desc="shape", param=metadata.ListParameter, readonly=True, visible=True, no_value=(0, 0))

def sniff(self, filename):
if super().sniff(filename):
Expand All @@ -990,7 +990,7 @@ def set_meta(self, dataset, overwrite=True, **kwd):
dataset.metadata.layers_count = len(anndata_file)
dataset.metadata.layers_names = list(anndata_file.keys())

def _layercountsize (tmp, lennames=0):
def _layercountsize(tmp, lennames=0):
"From TMP and LENNAMES, return layers, their number, and the length of one of the layers (all equal)."
if hasattr(tmp, 'dtype'):
layers = [util.unicodify(x) for x in tmp.dtype.names]
Expand All @@ -1016,15 +1016,15 @@ def _layercountsize (tmp, lennames=0):
if 'raw.var' in dataset.metadata.layers_names:
tmp = anndata_file["raw.var"]
# full set of genes would never need to be previewed
#dataset.metadata.raw_var_names = tmp["index"]
# dataset.metadata.raw_var_names = tmp["index"]
dataset.metadata.raw_var_layers, \
dataset.metadata.raw_var_count, \
dataset.metadata.raw_var_size = _layercountsize(tmp, len(tmp["index"]))

if 'var' in dataset.metadata.layers_names:
tmp = anndata_file["var"]
# row names are never used in preview windows
#dataset.metadata.var_names = tmp["index"]
# dataset.metadata.var_names = tmp["index"]
dataset.metadata.var_layers, \
dataset.metadata.var_count, \
dataset.metadata.var_size = _layercountsize(tmp, len(tmp["index"]))
Expand Down Expand Up @@ -1054,7 +1054,7 @@ def set_peek(self, dataset, is_multi_byte=False):
if not dataset.dataset.purged:
tmp = dataset.metadata

def _makelayerstrings (layer, count, names):
def _makelayerstrings(layer, count, names):
"Format the layers."
if layer in tmp.layers_names:
return "\n[%s]: %d %s\n %s" % (
Expand Down

0 comments on commit cc73b3b

Please sign in to comment.