Skip to content

Commit

Permalink
Update default hello.py to pass ruff format (#6811)
Browse files Browse the repository at this point in the history
Closes #6808
  • Loading branch information
my1e5 authored Aug 29, 2024
1 parent 3be4fe5 commit f956ab8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/uv/src/commands/project/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ fn init_application(
def main():
print("Hello from {name}!")
if __name__ == "__main__":
main()
"#},
Expand Down
3 changes: 3 additions & 0 deletions crates/uv/tests/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ fn init_application() -> Result<()> {
def main():
print("Hello from foo!")
if __name__ == "__main__":
main()
"###
Expand Down Expand Up @@ -222,6 +223,7 @@ fn init_application_other_python_exists() -> Result<()> {
def main():
print("Hello from foo!")
if __name__ == "__main__":
main()
"###
Expand Down Expand Up @@ -561,6 +563,7 @@ fn init_application_current_dir() -> Result<()> {
def main():
print("Hello from foo!")
if __name__ == "__main__":
main()
"###
Expand Down
1 change: 1 addition & 0 deletions docs/concepts/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ The created script defines a `main` function with some standard boilerplate:
def main():
print("Hello from example-app!")


if __name__ == "__main__":
main()
```
Expand Down

0 comments on commit f956ab8

Please sign in to comment.