Skip to content

Commit df34473

Browse files
committed
Make code cleaner
1 parent 01a6f4b commit df34473

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

mypy/build.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -280,13 +280,13 @@ def compute_search_paths(sources: List[BuildSource],
280280
assert site_dir not in lib_path
281281
if site_dir in mypypath:
282282
print("{} is in the MYPYPATH. Please remove it.".format(site_dir), file=sys.stderr)
283+
sys.exit(1)
283284
elif site_dir in python_path:
284-
print("{} is in the PYTHONPATH. Please change directory so it is not.".format(site_dir),
285+
print("{} is in the PYTHONPATH. Please change directory"
286+
" so it is not.".format(site_dir),
285287
file=sys.stderr)
286-
else:
287-
# this site not in any of the other paths, we are safe.
288-
continue
289-
sys.exit(1)
288+
sys.exit(1)
289+
290290
return SearchPaths(tuple(reversed(python_path)),
291291
tuple(mypypath),
292292
package_path,

0 commit comments

Comments
 (0)