Skip to content

Commit

Permalink
FIX: Avoid bare 'except' (#686)
Browse files Browse the repository at this point in the history
  • Loading branch information
oyamad committed Jan 3, 2023
1 parent 1a24f0a commit 443ca85
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion quantecon/game_theory/lemke_howson.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def lemke_howson(g, init_pivot=0, max_iter=10**6, capping=None,
"""
try:
N = g.N
except:
except AttributeError:
raise TypeError('g must be a 2-player NormalFormGame')
if N != 2:
raise NotImplementedError('Implemented only for 2-player games')
Expand Down
2 changes: 1 addition & 1 deletion quantecon/game_theory/mclennan_tourky.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def mclennan_tourky(g, init=None, epsilon=1e-3, max_iter=200,
"""
try:
N = g.N
except:
except AttributeError:
raise TypeError('g must be a NormalFormGame')
if N < 2:
raise NotImplementedError('Not implemented for 1-player games')
Expand Down
2 changes: 1 addition & 1 deletion quantecon/game_theory/support_enumeration.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def support_enumeration_gen(g):
"""
try:
N = g.N
except:
except AttributeError:
raise TypeError('input must be a 2-player NormalFormGame')
if N != 2:
raise NotImplementedError('Implemented only for 2-player games')
Expand Down

0 comments on commit 443ca85

Please sign in to comment.