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

Update default hello.py to pass ruff format #6811

Merged
merged 4 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading