diff --git a/mhctools/__init__.py b/mhctools/__init__.py index 129aa71..f541f64 100644 --- a/mhctools/__init__.py +++ b/mhctools/__init__.py @@ -23,7 +23,7 @@ from .random_predictor import RandomBindingPredictor from .unsupported_allele import UnsupportedAllele -__version__ = "1.8.2" +__version__ = "1.9.0" __all__ = [ "BindingPrediction", diff --git a/mhctools/base_predictor.py b/mhctools/base_predictor.py index 0e53b5a..aae8adc 100644 --- a/mhctools/base_predictor.py +++ b/mhctools/base_predictor.py @@ -242,7 +242,7 @@ def _check_hla_alleles( HLA alleles, return a set of alleles that we will pass into the MHC binding predictor. """ - require_iterable_of(alleles, string_types, "HLA alleles") + require_iterable_of(alleles, str, "HLA alleles") # Don't run the MHC predictor twice for homozygous alleles, # only run it for unique alleles diff --git a/mhctools/iedb.py b/mhctools/iedb.py index 7a4f2b1..5762758 100644 --- a/mhctools/iedb.py +++ b/mhctools/iedb.py @@ -153,7 +153,7 @@ def __init__( # for not raising, since sometimes we want to be more permissive with IEDB predictors self.raise_on_error = raise_on_error - if not isinstance(url, string_types): + if not isinstance(url, str): raise TypeError("Expected URL to be string, not %s : %s" % ( url, type(url))) self.url = url diff --git a/tests/test_netmhc_pan.py b/tests/test_netmhc_pan.py index 78128bc..fd5d832 100644 --- a/tests/test_netmhc_pan.py +++ b/tests/test_netmhc_pan.py @@ -2,11 +2,7 @@ from mhctools import NetMHCpan -# Defining FileNotFoundError for Python 2.x -try: - FileNotFoundError -except NameError: - FileNotFoundError = IOError + DEFAULT_ALLELE = 'HLA-A*02:01'