🎨 use a list comprehension

上级 af3c1cfe
......@@ -163,9 +163,9 @@ def message_about_scripts_not_on_PATH(scripts):
grouped_by_dir[parent_dir].add(script_name)
# We don't want to warn for directories that are on PATH.
not_warn_dirs = list(
not_warn_dirs = [
os.path.normcase(i) for i in os.environ["PATH"].split(os.pathsep)
)
]
# If an executable sits with sys.executable, we don't warn for it.
# This covers the case of venv invocations without activating the venv.
not_warn_dirs.append(os.path.normcase(os.path.dirname(sys.executable)))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册