diff options
author | BonfaceKilz | 2020-08-19 03:13:53 +0300 |
---|---|---|
committer | BonfaceKilz | 2020-08-19 03:13:53 +0300 |
commit | 7e60647223017220747d248ed1c986cc8374435e (patch) | |
tree | c3b7df36949b2c63b850950a175470161960b44c | |
parent | 8be6ecf3d6b70b40be97d4abebb59eabcce8c8f8 (diff) | |
download | genenetwork2-7e60647223017220747d248ed1c986cc8374435e.tar.gz |
Wrap `raise` statements in parenthesis
Run `2to3-3.8 -f raise -w .`
See: <https://docs.python.org/2/library/2to3.html#2to3fixer-raise>
-rw-r--r-- | wqflask/base/trait.py | 2 | ||||
-rw-r--r-- | wqflask/utility/svg.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index e82df226..c2d260e3 100644 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -605,6 +605,6 @@ def retrieve_trait_info(trait, dataset, get_qtl_info=False): if trait.lrs != "": trait.LRS_score_repr = LRS_score_repr = '%3.1f' % trait.lrs else: - raise KeyError, `trait.name`+' information is not found in the database.' + raise KeyError(`trait.name`+' information is not found in the database.') return trait
\ No newline at end of file diff --git a/wqflask/utility/svg.py b/wqflask/utility/svg.py index c7356e57..872f22fe 100644 --- a/wqflask/utility/svg.py +++ b/wqflask/utility/svg.py @@ -445,7 +445,7 @@ class rect(SVGelement): def __init__(self, x=None, y=None, width=None, height=None, fill=None, stroke=None, stroke_width=None, **args): if width == None or height == None: - raise ValueError, 'both height and width are required' + raise ValueError('both height and width are required') SVGelement.__init__(self,'rect',{'width':width,'height':height},**args) if x!=None: @@ -466,7 +466,7 @@ class ellipse(SVGelement): """ def __init__(self,cx=None,cy=None,rx=None,ry=None,fill=None,stroke=None,stroke_width=None,**args): if rx==None or ry== None: - raise ValueError, 'both rx and ry are required' + raise ValueError('both rx and ry are required') SVGelement.__init__(self,'ellipse',{'rx':rx,'ry':ry},**args) if cx!=None: @@ -488,7 +488,7 @@ class circle(SVGelement): """ def __init__(self,cx=None,cy=None,r=None,fill=None,stroke=None,stroke_width=None,**args): if r==None: - raise ValueError, 'r is required' + raise ValueError('r is required') SVGelement.__init__(self,'circle',{'r':r},**args) if cx!=None: self.attributes['cx']=cx @@ -714,7 +714,7 @@ class image(SVGelement): """ def __init__(self,url,x=None,y=None,width=None,height=None,**args): if width==None or height==None: - raise ValueError, 'both height and width are required' + raise ValueError('both height and width are required') SVGelement.__init__(self,'image',{'xlink:href':url,'width':width,'height':height},**args) if x!=None: self.attributes['x']=x |