From 19caa6cb8047ed8b2d18667a9bca9b68d2cadf5e Mon Sep 17 00:00:00 2001 From: george-hall-ucl Date: Tue, 8 Aug 2023 16:04:03 +0100 Subject: [PATCH] Sorry -- forgot to lint --- cellxgene_gateway/items/file/fileitem_source.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cellxgene_gateway/items/file/fileitem_source.py b/cellxgene_gateway/items/file/fileitem_source.py index eb96c22..6348456 100644 --- a/cellxgene_gateway/items/file/fileitem_source.py +++ b/cellxgene_gateway/items/file/fileitem_source.py @@ -197,13 +197,18 @@ class FileItemSource(ItemSource): # Catch gene sets without accompanying [annotations].csv gene_sets_files = [ - self.make_fileitem_from_path(annotation[:-len(self.gene_set_file_suffix)] + ".csv", annotations_subpath, True) + self.make_fileitem_from_path( + annotation[: -len(self.gene_set_file_suffix)] + ".csv", + annotations_subpath, + True, + ) for annotation in sorted_files if self.is_gene_set(annotation) - and annotation[:-len(self.gene_set_file_suffix)] not in [a.name for a in annotation_files] + and annotation[: -len(self.gene_set_file_suffix)] + not in [a.name for a in annotation_files] and os.path.isfile(os.path.join(annotations_fullpath, annotation)) ] - return sorted(annotation_files + gene_sets_files, key = lambda x: x.name) + return sorted(annotation_files + gene_sets_files, key=lambda x: x.name) else: return None