Skip to content

Commit 8b9f35e

Browse files
authored
Construct the set in one expression.
1 parent ec303d5 commit 8b9f35e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

distutils/dir_util.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,7 @@ def create_tree(base_dir, files, mode=0o777, verbose=1, dry_run=0):
9494
'dry_run' flags are as for 'mkpath()'.
9595
"""
9696
# First get the list of directories to create
97-
need_dir = set()
98-
need_dir.update(os.path.join(base_dir, os.path.dirname(file)) for file in files)
97+
need_dir = set(os.path.join(base_dir, os.path.dirname(file)) for file in files)
9998

10099
# Now create them
101100
for dir in sorted(need_dir):

0 commit comments

Comments
 (0)