Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hello.py does not pass ruff format #6808

Closed
my1e5 opened this issue Aug 29, 2024 · 2 comments · Fixed by #6811
Closed

hello.py does not pass ruff format #6808

my1e5 opened this issue Aug 29, 2024 · 2 comments · Fixed by #6811
Labels
bug Something isn't working

Comments

@my1e5
Copy link
Contributor

my1e5 commented Aug 29, 2024

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.

@charliermarsh
Copy link
Member

Lol, thank you. Yes. (PR welcome or we'll fix soon.)

@charliermarsh charliermarsh added the bug Something isn't working label Aug 29, 2024
@zanieb
Copy link
Member

zanieb commented Aug 29, 2024

Thanks :) the problem with writing Python manually in a Rust string...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants