From 69337e58fe540e8236eb31c36000584a06bf421b Mon Sep 17 00:00:00 2001 From: Amethyst Reese Date: Sat, 2 Mar 2024 17:31:19 -0800 Subject: [PATCH] apply Black 2024 style in fbcode (5/16) Summary: Formats the covered files with pyfmt. paintitblack Reviewed By: aleivag Differential Revision: D54447730 fbshipit-source-id: 85ed104b2f8f5e26ae0dea9ee17392ecad8b9407 --- build/fbcode_builder/getdeps/builder.py | 2 +- build/fbcode_builder/getdeps/cargo.py | 4 ++-- build/fbcode_builder/getdeps/load.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/fbcode_builder/getdeps/builder.py b/build/fbcode_builder/getdeps/builder.py index 090291e8714..f3246fe85c2 100644 --- a/build/fbcode_builder/getdeps/builder.py +++ b/build/fbcode_builder/getdeps/builder.py @@ -334,7 +334,7 @@ def _build(self, install_dirs, reconfigure) -> None: env = self._compute_env(install_dirs) # Some configure scripts need additional env values passed derived from cmds - for (k, cmd_args) in self.conf_env_args.items(): + for k, cmd_args in self.conf_env_args.items(): out = ( subprocess.check_output(cmd_args, env=dict(env.items())) .decode("utf-8") diff --git a/build/fbcode_builder/getdeps/cargo.py b/build/fbcode_builder/getdeps/cargo.py index 315f80b1709..15996ad5154 100644 --- a/build/fbcode_builder/getdeps/cargo.py +++ b/build/fbcode_builder/getdeps/cargo.py @@ -336,7 +336,7 @@ def _resolve_dep_to_git(self): crate_source_map = {} if dep_crate_map: - for (crate, subpath) in dep_crate_map.items(): + for crate, subpath in dep_crate_map.items(): if crate not in crate_source_map: if self.build_opts.is_windows(): subpath = subpath.replace("/", "\\") @@ -444,7 +444,7 @@ def _resolve_crate_to_path(self, crate, crate_source_map): """ search_pattern = '[package]\nname = "{}"'.format(crate) - for (_crate, crate_source_dir) in crate_source_map.items(): + for _crate, crate_source_dir in crate_source_map.items(): for crate_root, _, files in os.walk(crate_source_dir): if "Cargo.toml" in files: with open(os.path.join(crate_root, "Cargo.toml"), "r") as f: diff --git a/build/fbcode_builder/getdeps/load.py b/build/fbcode_builder/getdeps/load.py index 6390f2fb14b..478e1b4cdbe 100644 --- a/build/fbcode_builder/getdeps/load.py +++ b/build/fbcode_builder/getdeps/load.py @@ -19,7 +19,7 @@ class Loader(object): def _list_manifests(self, build_opts): """Returns a generator that iterates all the available manifests""" - for (path, _, files) in os.walk(build_opts.manifests_dir): + for path, _, files in os.walk(build_opts.manifests_dir): for name in files: # skip hidden files if name.startswith("."):