Skip to content

Commit 82c4551

Browse files
pavelvazquezsveinugu
authored andcommitted
Fixed some more flake8 errors
1 parent f3f2ea8 commit 82c4551

File tree

6 files changed

+16
-13
lines changed

6 files changed

+16
-13
lines changed

src/omnipy/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,17 @@
44
import sys
55
from typing import Optional
66

7+
from omnipy.hub.runtime import Runtime
8+
79
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
810

9-
# TODO: The check disabling runtime for tests also trigger for tests that are run outside of Omnipy, breaking
10-
# tests on the user side. Find a better way to disable the global runtime object for Omnipy tests
11+
# TODO: The check disabling runtime for tests also trigger for tests that are run outside of Omnipy,
12+
# breaking tests on the user side.
13+
# Find a better way to disable the global runtime object for Omnipy tests
1114

1215

1316
def _get_runtime() -> Optional['Runtime']:
1417
if 'pytest' not in sys.modules:
15-
from omnipy.hub.runtime import Runtime
1618
return Runtime()
1719
else:
1820
return None

src/omnipy/config/job.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
from dataclasses import dataclass, field
2-
from datetime import datetime
2+
# from datetime import datetime
33
from pathlib import Path
4-
from typing import Optional
54

65
from omnipy.api.enums import ConfigPersistOutputsOptions, ConfigRestoreOutputsOptions
76

7+
# from typing import Optional
8+
89

910
def _get_persist_data_dir_path() -> str:
1011
return str(Path.cwd().joinpath(Path('data')))

src/omnipy/modules/fairtracks/create_filter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import requests
88

99
#########################################################
10-
### user parameters
10+
# user parameters
1111
#######################################################
1212
download_all_projects = False
1313
download_all_cases = False
@@ -17,7 +17,7 @@
1717
# NB very few annotations per case, get all
1818

1919
#######################################################
20-
###endpoints definition
20+
# endpoints definition
2121
########################################################
2222
projects_endpt = 'https://api.gdc.cancer.gov/projects'
2323
cases_endpt = 'https://api.gdc.cancer.gov/cases'
@@ -73,7 +73,7 @@
7373
projects_list = (response.json()['data']['hits'])
7474

7575
##########################################################################
76-
#Step3: filtered query on 'cases' (filter on project_id) to get cases ID for each TCGA project
76+
# Step3: filtered query on 'cases' (filter on project_id) to get cases ID for each TCGA project
7777
# the IDs for all the files are also available form this endpoint
7878
########################################################################
7979

@@ -102,7 +102,7 @@
102102
proj['cases'] = cases
103103

104104
##########################################################################
105-
#step4: filtered query on 'annotations' (filter on case_id) to get cases ID for each TCGA project
105+
# step4: filtered query on 'annotations' (filter on case_id) to get cases ID for each TCGA project
106106
# the IDs for all the files are also available form this endpoint
107107
########################################################################
108108

src/omnipy/modules/fairtracks/get_from_filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
with open(endpt_str + '_filter.json', 'r') as infile:
1515
filters = json.load(infile)
16-
params = { #'fields': fields,
16+
params = { # 'fields': fields,
1717
'filters': json.dumps(filters),
1818
}
1919
response = requests.get(endpt, params=params)

src/omnipy/modules/general/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
class NotIteratorExceptStrings(Model[object]):
77
def _parse_data(cls, data: object) -> object:
8-
assert isinstance(data, str) or not isinstance(data, Iterable)
8+
assert isinstance(data, str) or not isinstance(data, Iterable)

src/omnipy/modules/raw/serializers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
from typing import Any, Dict, IO, Type
22

3-
from typing_inspect import get_generic_bases, get_generic_type, get_origin, get_parameters
4-
53
from omnipy.data.dataset import Dataset
64
from omnipy.data.model import Model
75
from omnipy.data.serializer import TarFileSerializer
86

7+
# from typing_inspect import get_generic_bases, get_generic_type, get_origin, get_parameters
8+
99

1010
class RawDatasetToTarFileSerializer(TarFileSerializer):
1111
""""""

0 commit comments

Comments
 (0)