Skip to content

Commit 1d744d4

Browse files
chore: run black on expandsymlinks.py (googleapis#1789)
* chore: run black on expandsymlinks.py * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 77d8a69 commit 1d744d4

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed

expandsymlinks.py

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,41 +18,36 @@
1818
"""Copy files from source to dest expanding symlinks along the way.
1919
"""
2020

21-
from shutil import copytree
22-
2321
import argparse
22+
from shutil import copytree
2423
import sys
2524

26-
2725
# Ignore these files and directories when copying over files into the snapshot.
28-
IGNORE = set(['.hg', 'httplib2', 'oauth2', 'simplejson', 'static'])
26+
IGNORE = set([".hg", "httplib2", "oauth2", "simplejson", "static"])
2927

3028
# In addition to the above files also ignore these files and directories when
3129
# copying over samples into the snapshot.
32-
IGNORE_IN_SAMPLES = set(['googleapiclient', 'oauth2client', 'uritemplate'])
30+
IGNORE_IN_SAMPLES = set(["googleapiclient", "oauth2client", "uritemplate"])
3331

3432
parser = argparse.ArgumentParser(description=__doc__)
3533

36-
parser.add_argument('--source', default='.',
37-
help='Directory name to copy from.')
34+
parser.add_argument("--source", default=".", help="Directory name to copy from.")
3835

39-
parser.add_argument('--dest', default='snapshot',
40-
help='Directory name to copy to.')
36+
parser.add_argument("--dest", default="snapshot", help="Directory name to copy to.")
4137

4238

4339
def _ignore(path, names):
44-
retval = set()
45-
if path != '.':
46-
retval = retval.union(IGNORE_IN_SAMPLES.intersection(names))
47-
retval = retval.union(IGNORE.intersection(names))
48-
return retval
40+
retval = set()
41+
if path != ".":
42+
retval = retval.union(IGNORE_IN_SAMPLES.intersection(names))
43+
retval = retval.union(IGNORE.intersection(names))
44+
return retval
4945

5046

5147
def main():
52-
copytree(FLAGS.source, FLAGS.dest, symlinks=True,
53-
ignore=_ignore)
48+
copytree(FLAGS.source, FLAGS.dest, symlinks=True, ignore=_ignore)
5449

5550

56-
if __name__ == '__main__':
57-
FLAGS = parser.parse_args(sys.argv[1:])
58-
main()
51+
if __name__ == "__main__":
52+
FLAGS = parser.parse_args(sys.argv[1:])
53+
main()

noxfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"scripts",
2626
"tests",
2727
"describe.py",
28+
"expandsymlinks.py",
2829
"noxfile.py",
2930
"owlbot.py",
3031
"setup.py",

0 commit comments

Comments
 (0)