[PATCH v5 01/13] scripts: generate_rust_analyzer.py: add missing whitespace

Tamir Duberstein
2025-03-25T20:06:42Z

Add a space before the `/` operator for consistency with surrounding
code and code formatting tools. Add a second newline between top-level
items in accordance with PEP 8[1]:

> Surround top-level function and class definitions with two blank
lines.

This change was made by a code formatting tool.

Link: https://peps.python.org/pep-0008/ [1]
Reviewed-by: Fiona Behrens <me@kloenk.dev>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Tested-by: Daniel Almeida <daniel.almeida@collabora.com>
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
scripts/generate_rust_analyzer.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index a0e5a0aef444..7bd7f7ef2529 100755
--- a/scripts/generate_rust_analyzer.py
+++ b/scripts/generate_rust_analyzer.py
@@ -118,7 +118,7 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs):
):
append_crate(
display_name,
- srctree / "rust"/ display_name / "lib.rs",
+ srctree / "rust" / display_name / "lib.rs",
deps,
cfg=cfg,
)
@@ -167,6 +167,7 @@ def generate_crates(srctree, objtree, sysroot_src, external_src, cfgs):

return crates

+
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--verbose', '-v', action='store_true')
@@ -193,5 +194,6 @@ def main():

json.dump(rust_project, sys.stdout, sort_keys=True, indent=4)

+
if __name__ == "__main__":
main()

--
2.49.0