Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0becfe9

Browse files
committed
fix 2 unecessary else statements
1 parent c628dc2 commit 0becfe9

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/matplotlib/backends/backend_ps.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ def _get_papertype(w, h):
137137
if key.startswith('l'): continue
138138
pw, ph = papersize[key]
139139
if (w < pw) and (h < ph): return key
140-
else:
141-
return 'a0'
140+
return 'a0'
142141

143142
def _num_to_str(val):
144143
if isinstance(val, six.string_types): return val

tools/gh_api.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,7 @@ def get_milestone_id(project, milestone, auth=False, **params):
183183
for mstone in milestones:
184184
if mstone['title'] == milestone:
185185
return mstone['number']
186-
else:
187-
raise ValueError("milestone %s not found" % milestone)
186+
raise ValueError("milestone %s not found" % milestone)
188187

189188
def is_pull_request(issue):
190189
"""Return True if the given issue is a pull request."""

0 commit comments

Comments
 (0)