[PATCH v4 01/11] scripts: generate_rust_analyzer.py: add missing whitespace

Tamir Duberstein posted 11 patches 9 months ago
There is a newer version of this series
[PATCH v4 01/11] scripts: generate_rust_analyzer.py: add missing whitespace
Posted by Tamir Duberstein 9 months ago
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>
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
---
 scripts/generate_rust_analyzer.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
index a0e5a0aef444..fc1788764b31 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,
         )
@@ -193,5 +193,6 @@ def main():
 
     json.dump(rust_project, sys.stdout, sort_keys=True, indent=4)
 
+
 if __name__ == "__main__":
     main()

-- 
2.48.1
Re: [PATCH v4 01/11] scripts: generate_rust_analyzer.py: add missing whitespace
Posted by Daniel Almeida 8 months, 4 weeks ago

> On 22 Mar 2025, at 10:23, Tamir Duberstein <tamird@gmail.com> wrote:
> 
> 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>
> Signed-off-by: Tamir Duberstein <tamird@gmail.com>
> ---
> scripts/generate_rust_analyzer.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/scripts/generate_rust_analyzer.py b/scripts/generate_rust_analyzer.py
> index a0e5a0aef444..fc1788764b31 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,
>         )
> @@ -193,5 +193,6 @@ def main():
> 
>     json.dump(rust_project, sys.stdout, sort_keys=True, indent=4)
> 
> +
> if __name__ == "__main__":
>     main()
> 
> -- 
> 2.48.1
> 
> 

Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>