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

Use type hints in code from uv init #7225

Merged
merged 1 commit into from
Sep 9, 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
2 changes: 1 addition & 1 deletion crates/uv/src/commands/project/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ impl InitProjectKind {
fs_err::write(
init_py,
indoc::formatdoc! {r#"
def hello():
def hello() -> None:
print("Hello from {name}!")
"#},
)?;
Expand Down
2 changes: 1 addition & 1 deletion crates/uv/tests/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ fn init_application_package() -> Result<()> {
}, {
assert_snapshot!(
init, @r###"
def hello():
def hello() -> None:
print("Hello from foo!")
"###
);
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ example-packaged-app
But the module defines a CLI function:

```python title="__init__.py"
def hello():
def hello() -> None:
print("Hello from example-packaged-app!")
```

Expand Down
Loading