Skip to content

Commit f024d94

Browse files
committed
Bug 1786490 - reformat the tree using black 23.3.0 r=sylvestre,webdriver-reviewers,taskgraph-reviewers,whimboo,jmaher,ahal,perftest-reviewers,geckoview-reviewers,afinder,m_kato
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D186092
1 parent 51f5fcd commit f024d94

File tree

290 files changed

+777
-840
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

290 files changed

+777
-840
lines changed

build/mach_initialize.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
class MetaPathFinder(object):
1515
pass
1616

17-
1817
else:
1918
from importlib.abc import MetaPathFinder
2019

build/moz.configure/memory.configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ set_config("MOZ_REPLACE_MALLOC_STATIC", replace_malloc_static)
5858
# PHC (Probabilistic Heap Checker)
5959
# ==============================================================
6060

61+
6162
# In general, it only makes sense for PHC to run on the platforms that have a
6263
# crash reporter.
6364
@depends(

build/moz.configure/nspr.configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def pkgconf_requires_private(system_nspr, nspr_minver):
8383

8484
set_config("PKGCONF_REQUIRES_PRIVATE", pkgconf_requires_private)
8585

86+
8687
# pkg_check_modules takes care of NSPR_CFLAGS and NSPR_LIBS when using --with-system-nspr.
8788
@depends(build_environment, c_compiler, fold_libs, when=build_nspr)
8889
def nspr_config(build_env, c_compiler, fold_libs):

build/moz.configure/toolchain.configure

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,7 @@ def sysroot(host_or_target, target_sysroot=None):
10331033
opt = "--with-host-sysroot"
10341034
env = "HOST_SYSROOT"
10351035
when = depends(host)(lambda h: h.kernel == "Linux")
1036+
10361037
# Only bootstrap a host sysroot when using a bootstrapped target sysroot
10371038
# or when the target doesn't use a bootstrapped sysroot in the first place.
10381039
@depends(when, bootstrap_target_when, target_sysroot.bootstrapped)
@@ -1731,7 +1732,6 @@ def select_linker_tmpl(host_or_target):
17311732
@imports("os")
17321733
@imports("shutil")
17331734
def select_linker(linker, c_compiler, developer_options, toolchain_flags, target):
1734-
17351735
if linker:
17361736
linker = linker[0]
17371737
else:
@@ -2500,6 +2500,7 @@ def cet_ldflags(c_compiler, target):
25002500

25012501
set_config("MOZ_CETCOMPAT_LDFLAGS", cet_ldflags)
25022502

2503+
25032504
# Frame pointers
25042505
# ==============================================================
25052506
@depends(c_compiler)
@@ -2785,6 +2786,7 @@ add_old_configure_assignment(
27852786
"ENABLE_MOZSEARCH_PLUGIN", depends_if("--enable-mozsearch-plugin")(lambda _: True)
27862787
)
27872788

2789+
27882790
# Libstdc++ compatibility hacks
27892791
# ==============================================================
27902792
#
@@ -2966,6 +2968,7 @@ add_old_configure_assignment("LIBFUZZER_FLAGS", libfuzzer_flags.use_flags)
29662968
# Shared library building
29672969
# ==============================================================
29682970

2971+
29692972
# XXX: The use of makefile constructs in these variables is awful.
29702973
@depends(target, c_compiler)
29712974
def make_shared_library(target, compiler):

build/moz.configure/update-programs.configure

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# License, v. 2.0. If a copy of the MPL was not distributed with this
55
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
66

7+
78
# Updater
89
# ==============================================================
910
@depends(build_project)

build/unix/rewrite_sanitizer_dylib.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def scan_directory(path):
6060
sys.exit(1)
6161

6262
for file in path.rglob("*"):
63-
6463
if not file.is_file():
6564
continue
6665

config/check_vanilla_allocations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def main():
208208
if f in ignored_files and (f, 2) in functions:
209209
fail(f"There should be only one {f} file")
210210

211-
for (filename, n) in sorted(functions):
211+
for filename, n in sorted(functions):
212212
for fn in functions[(filename, n)]:
213213
# An allocation is present in a non-special file. Fail!
214214
fail("'" + fn + "' present in " + filename)

config/mozunit/mozunit/mozunit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def _mocked_file(self, name, mode, content=None):
219219
content = six.ensure_binary(content or b"")
220220
return MockedBytesFile(self, name, content)
221221
else:
222-
content = six.ensure_text(content or u"")
222+
content = six.ensure_text(content or "")
223223
return MockedStringFile(self, name, content)
224224

225225

config/tests/unit-nsinstall.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ def test_nsinstall_d(self):
146146
@unittest.skipIf(not RUN_NON_ASCII_TESTS, "Skipping non ascii tests")
147147
def test_nsinstall_non_ascii(self):
148148
"Test that nsinstall handles non-ASCII files"
149-
filename = u"\u2325\u3452\u2415\u5081"
149+
filename = "\u2325\u3452\u2415\u5081"
150150
testfile = self.touch(filename)
151-
testdir = self.mkdirs(u"\u4241\u1D04\u1414")
151+
testdir = self.mkdirs("\u4241\u1D04\u1414")
152152
self.assertEqual(
153153
nsinstall([testfile.encode("utf-8"), testdir.encode("utf-8")]), 0
154154
)
@@ -162,9 +162,9 @@ def test_nsinstall_non_ascii(self):
162162
)
163163
def test_nsinstall_non_ascii_subprocess(self):
164164
"Test that nsinstall as a subprocess handles non-ASCII files"
165-
filename = u"\u2325\u3452\u2415\u5081"
165+
filename = "\u2325\u3452\u2415\u5081"
166166
testfile = self.touch(filename)
167-
testdir = self.mkdirs(u"\u4241\u1D04\u1414")
167+
testdir = self.mkdirs("\u4241\u1D04\u1414")
168168
# We don't use subprocess because it can't handle Unicode on
169169
# Windows <http://bugs.python.org/issue1759845>. mozprocess calls
170170
# CreateProcessW directly so it's perfect.

devtools/rename.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# License, v. 2.0. If a copy of the MPL was not distributed with this
55
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
66

7+
78
# Put the content of `filenames[0]` file into `output` file pointer
89
def main(output, *filenames):
910
with open(filenames[0], "r", encoding="utf-8") as f:

0 commit comments

Comments
 (0)