From 2d389f2da4812eb93779223ec21ffb0e9c9ebf41 Mon Sep 17 00:00:00 2001 From: John Reese Date: Sun, 4 Oct 2020 22:01:03 -0700 Subject: [PATCH] Apply pyfmt to fbcode/tools Summary: Formats a subset of opted-in Python files in fbsource. Black formatting was applied first, which is guaranteed safe as the AST will not have changed during formatting. Pyfmt was then run, which also includes import sorting. The changes from isort were manually reviewed, and some potentially dangerous changes were reverted, and the `# isort:skip_file` directive was added to those files. A final run of pyfmt shows no more changes to be applied. Reviewed By: zertosh Differential Revision: D24106756 fbshipit-source-id: 7efa84885ffb5bc664b50ba5d9aba0e9984e455a --- xar/deprecated/mount_xar.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xar/deprecated/mount_xar.py b/xar/deprecated/mount_xar.py index 2b808cb..41cbdb7 100644 --- a/xar/deprecated/mount_xar.py +++ b/xar/deprecated/mount_xar.py @@ -94,7 +94,9 @@ def _read_header(self): def mount(self, xarexec): logger.info("Mounting %s with %s" % (self.filename, xarexec)) - proc = subprocess.Popen([xarexec.split(), "-m", self.filename], stdout=subprocess.PIPE) + proc = subprocess.Popen( + [xarexec.split(), "-m", self.filename], stdout=subprocess.PIPE + ) stdout, _ = proc.communicate() if proc.returncode != 0: logger.fatal("Mount of %s failed, see stderr for details" % self.filename)