Skip to content

Commit

Permalink
Use backticks in project init message (#5302)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb authored Jul 22, 2024
1 parent 746e4b2 commit 8d12a66
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions crates/uv/src/commands/project/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ pub(crate) async fn init(
match explicit_path {
// Initialized a project in the current directory.
None => {
writeln!(printer.stderr(), "Initialized project {}", name.cyan())?;
writeln!(printer.stderr(), "Initialized project `{}`", name.cyan())?;
}

// Initialized a project in the given directory.
Expand All @@ -147,7 +147,7 @@ pub(crate) async fn init(

writeln!(
printer.stderr(),
"Initialized project {} in {}",
"Initialized project `{}` at `{}`",
name.cyan(),
path.display().cyan()
)?;
Expand Down
14 changes: 7 additions & 7 deletions crates/uv/tests/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fn init() -> Result<()> {
----- stderr -----
warning: `uv init` is experimental and may change without warning
Initialized project foo in [TEMP_DIR]/foo
Initialized project `foo` at `[TEMP_DIR]/foo`
"###);

let pyproject = fs_err::read_to_string(context.temp_dir.join("foo/pyproject.toml"))?;
Expand Down Expand Up @@ -83,7 +83,7 @@ fn init_no_readme() -> Result<()> {
----- stderr -----
warning: `uv init` is experimental and may change without warning
Initialized project foo in [TEMP_DIR]/foo
Initialized project `foo` at `[TEMP_DIR]/foo`
"###);

let pyproject = fs_err::read_to_string(context.temp_dir.join("foo/pyproject.toml"))?;
Expand Down Expand Up @@ -123,7 +123,7 @@ fn current_dir() -> Result<()> {
----- stderr -----
warning: `uv init` is experimental and may change without warning
Initialized project foo
Initialized project `foo`
"###);

let pyproject = fs_err::read_to_string(dir.join("pyproject.toml"))?;
Expand Down Expand Up @@ -201,7 +201,7 @@ fn init_workspace() -> Result<()> {
----- stderr -----
warning: `uv init` is experimental and may change without warning
Adding foo as member of workspace [TEMP_DIR]/
Initialized project foo
Initialized project `foo`
"###);

let pyproject = fs_err::read_to_string(child.join("pyproject.toml"))?;
Expand Down Expand Up @@ -296,7 +296,7 @@ fn init_workspace_relative_sub_package() -> Result<()> {
----- stderr -----
warning: `uv init` is experimental and may change without warning
Adding foo as member of workspace [TEMP_DIR]/
Initialized project foo in [TEMP_DIR]/foo
Initialized project `foo` at `[TEMP_DIR]/foo`
"###);

let pyproject = fs_err::read_to_string(child.join("pyproject.toml"))?;
Expand Down Expand Up @@ -392,7 +392,7 @@ fn init_workspace_outside() -> Result<()> {
----- stderr -----
warning: `uv init` is experimental and may change without warning
Adding foo as member of workspace [TEMP_DIR]/
Initialized project foo in [TEMP_DIR]/foo
Initialized project `foo` at `[TEMP_DIR]/foo`
"###);

let pyproject = fs_err::read_to_string(child.join("pyproject.toml"))?;
Expand Down Expand Up @@ -473,7 +473,7 @@ fn init_invalid_names() -> Result<()> {
----- stderr -----
warning: `uv init` is experimental and may change without warning
Initialized project foo-bar in [TEMP_DIR]/foo-bar
Initialized project `foo-bar` at `[TEMP_DIR]/foo-bar`
"###);

let child = context.temp_dir.child("foo-bar");
Expand Down

0 comments on commit 8d12a66

Please sign in to comment.