Skip to content

Commit 3c4f348

Browse files
committed
KBE-25/pylint_fix
1 parent c0e5a74 commit 3c4f348

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

api/data/refactoring.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,12 @@ def convert_hg19_to_hg38(position: str, lo=LiftOver('hg19', 'hg38')):
227227
return '?'
228228
try:
229229
new_pos = lo.convert_coordinate('chr6', int(position[2:10]))[0][1]
230-
except Exception as e:
231-
return f"Error processing variant: {str(e)}"
230+
except ValueError as ve:
231+
return f"Error processing variant (ValueError): {str(ve)}"
232+
except IndexError as ie:
233+
return f"Error processing variant (IndexError): {str(ie)}"
234+
except TypeError as te:
235+
return f"Error processing variant (TypeError): {str(te)}"
232236
return f"6-{new_pos}-{position[-3:]}"
233237

234238
lovd['VariantOnGenome/DNA/hg38'] = lovd['VariantOnGenome/DNA/hg38'].replace('', pd.NA)

api/tools/__init__.py

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

55
from .revel.revel import (
66
get_revel_scores
7-
)
7+
)

0 commit comments

Comments
 (0)