Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert directory fbcode/opensource to use the Ruff Formatter #1248

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions build/fbcode_builder/CMake/fb_py_test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
This file contains the main module code for Python test programs.
"""


import contextlib
import ctypes
import fnmatch
Expand Down Expand Up @@ -50,7 +49,6 @@ def read(self):


class TestStatus(object):

ABORTED = "FAILURE"
PASSED = "SUCCESS"
FAILED = "FAILURE"
Expand Down Expand Up @@ -230,7 +228,6 @@ def _find_next_test(self, suite):
"""

for test in suite:

# We identify test suites by test that are iterable (as is done in
# the builtin python test harness). If we see one, recurse on it.
if hasattr(test, "__iter__"):
Expand Down Expand Up @@ -429,7 +426,6 @@ def getTestCaseNames(self, testCaseClass):


class Loader(object):

suiteClass = unittest.TestSuite

def __init__(self, modules, regex=None):
Expand Down
4 changes: 1 addition & 3 deletions build/fbcode_builder/CMake/make_fbpy_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,7 @@ def create_main_module(args, inst_dir, path_map):
if __name__ == "__main__":
import {main_module}
{main_module}.{main_fn}()
""".format(
python=args.python, main_module=main_module, main_fn=main_fn
)
""".format(python=args.python, main_module=main_module, main_fn=main_fn)
with open(dest_path, "w") as f:
f.write(main_contents)
os.chmod(dest_path, 0o755)
Expand Down
1 change: 0 additions & 1 deletion build/fbcode_builder/getdeps/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ def _get_prefix(self):
return ["PREFIX=" + self.inst_dir, "prefix=" + self.inst_dir]

def _build(self, reconfigure) -> None:

env = self._compute_env()

# Need to ensure that PREFIX is set prior to install because
Expand Down
1 change: 0 additions & 1 deletion build/fbcode_builder/getdeps/buildopts.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ def __init__(
self.lib_path = lib_path

if vcvars_path is None and is_windows():

try:
# Allow a site-specific vcvarsall path.
from .facebook.vcvarsall import build_default_vcvarsall
Expand Down
4 changes: 1 addition & 3 deletions build/fbcode_builder/getdeps/cargo.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ def _create_cargo_config(self):
[profile.dev]
debug = false
incremental = false
""".format(
self.build_dir.replace("\\", "\\\\")
)
""".format(self.build_dir.replace("\\", "\\\\"))

# Point to vendored sources from getdeps manifests
for _dep, git_conf in dep_to_git.items():
Expand Down
4 changes: 1 addition & 3 deletions build/fbcode_builder/getdeps/dyndeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,7 @@ def _get_dev_run_script_contents(self, path_dirs) -> str:
}} finally {{
$env:PATH = $orig_env
}}
""".format(
path_str=path_str
)
""".format(path_str=path_str)


class ElfDeps(DepBase):
Expand Down