uv icon indicating copy to clipboard operation
uv copied to clipboard

`hello.py` does not pass `ruff format`

Open my1e5 opened this issue 5 months ago • 2 comments

uv version 0.4.0 creates a hello.py file by default when running

$ uv init my_project

The contents of hello.py are

$ cat hello.py
def main():
    print("Hello from my-project!")

if __name__ == "__main__":
    main()

Which is completely reasonable. But I noticed that this does not pass ruff format.

$ uv add ruff
$ uv run ruff format --diff .
--- hello.py
+++ hello.py
@@ -1,5 +1,6 @@
 def main():
     print("Hello from my-project!")

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

1 file would be reformatted

Maybe you want hello.py to be ruff approved out the box? It's a minor thing though.

my1e5 avatar Aug 29 '24 12:08 my1e5