Skip to content

Commit 3cc839c

Browse files
committed
fixed linting error on ensembl version
1 parent 6582ac6 commit 3cc839c

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

lint.sh

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
#!/bin/bash
22
set -o errexit
33

4-
5-
# disabling several categories of errors due to false positives in pylint,
6-
# see these issues:
7-
# - https://bitbucket.org/logilab/pylint/issues/701/false-positives-with-not-an-iterable-and
8-
# - https://bitbucket.org/logilab/pylint/issues/58
9-
10-
find pyensembl -name '*.py' \
11-
| xargs pylint \
12-
--errors-only \
13-
--disable=unsubscriptable-object,not-an-iterable,no-member
14-
15-
echo 'Passes pylint check'
4+
ruff check pyensembl/ \
5+
&& \
6+
echo "Passes ruff check"

pyensembl/ensembl_versions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
MAX_ENSEMBL_RELEASE = 114
1515
MAX_PLANTS_ENSEMBL_RELEASE = 58
1616

17+
1718
def check_release_number(release):
1819
"""
1920
Check to make sure a release is in the valid range of
2021
Ensembl releases.
2122
"""
2223
try:
2324
release = int(release)
24-
except:
25+
except (ValueError, TypeError):
2526
raise ValueError("Invalid Ensembl release: %s" % release)
2627

2728
if release < MIN_ENSEMBL_RELEASE:

0 commit comments

Comments
 (0)