[lldb] Format more Python files with black (#65979)
By running this from lldb/ $ black --exclude "third_party/|scripts/|utils/" ./
This commit is contained in:
1 parent
6bf6c4762c
commit
c8387a31a4
8 files changed
+158
-105
No files matched your search
@@ -5,7 +5,7 @@ pkgRelDir = sys.argv[1]
|
||||
pkgFiles = sys.argv[2:]
|
||||
|
||||
getFileName = lambda f: os.path.splitext(os.path.basename(f))[0]
|
||||
importNames = ', '.join('"{}"'.format(getFileName(f)) for f in pkgFiles)
|
||||
importNames = ", ".join('"{}"'.format(getFileName(f)) for f in pkgFiles)
|
||||
|
||||
script = """__all__ = [{import_names}]
|
||||
for x in __all__:
|
||||
@@ -18,7 +18,9 @@ def __lldb_init_module(debugger, internal_dict):
|
||||
lldb_init = getattr(submodule, '__lldb_init_module', None)
|
||||
if lldb_init:
|
||||
lldb_init(debugger, internal_dict)
|
||||
""".format(import_names=importNames, pkg_name=pkgRelDir.replace("/", "."))
|
||||
""".format(
|
||||
import_names=importNames, pkg_name=pkgRelDir.replace("/", ".")
|
||||
)
|
||||
|
||||
pkgIniFile = os.path.normpath(os.path.join(pkgRelDir, "__init__.py"))
|
||||
with open(pkgIniFile, "w") as f:
|
||||
|
||||
Reference in new issue
Block a user