Skip to content
Open
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
6 changes: 5 additions & 1 deletion crates/uv-resolver/src/lock/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1263,7 +1263,11 @@ impl Lock {
}

doc.insert("package", Item::ArrayOfTables(packages));
Ok(doc.to_string())

let content = doc.to_string();
Ok(format!(
"# This file was @generated by uv. Do not edit by hand.\n{content}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use a single space after the period? Basically every single style guide on earth recommends a single space (even when using a monospace font).
e.g. see https://cmosshoptalk.com/2020/03/24/one-space-or-two/ or https://apastyle.apa.org/style-grammar-guidelines/paper-format/accessibility/typography#myth4

))
}

/// Returns the package with the given name. If there are multiple
Expand Down
5 changes: 5 additions & 0 deletions crates/uv/tests/it/branching_urls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ fn root_package_splits_transitive_too() -> Result<()> {
);

assert_snapshot!(context.read("uv.lock"), @r#"
# This file was @generated by uv. Do not edit by hand.
version = 1
revision = 3
requires-python = ">=3.11, <3.13"
Expand Down Expand Up @@ -408,6 +409,7 @@ fn root_package_splits_other_dependencies_too() -> Result<()> {
);

assert_snapshot!(context.read("uv.lock"), @r#"
# This file was @generated by uv. Do not edit by hand.
version = 1
revision = 3
requires-python = ">=3.11, <3.13"
Expand Down Expand Up @@ -571,6 +573,7 @@ fn branching_between_registry_and_direct_url() -> Result<()> {

// We have source dist and wheel for the registry, but only the wheel for the direct URL.
assert_snapshot!(context.read("uv.lock"), @r#"
# This file was @generated by uv. Do not edit by hand.
version = 1
revision = 3
requires-python = ">=3.11, <3.13"
Expand Down Expand Up @@ -658,6 +661,7 @@ fn branching_urls_of_different_sources_disjoint() -> Result<()> {

// We have source dist and wheel for the registry, but only the wheel for the direct URL.
assert_snapshot!(context.read("uv.lock"), @r#"
# This file was @generated by uv. Do not edit by hand.
version = 1
revision = 3
requires-python = ">=3.11, <3.13"
Expand Down Expand Up @@ -788,6 +792,7 @@ fn dont_pre_visit_url_packages() -> Result<()> {
);

assert_snapshot!(context.read("uv.lock"), @r#"
# This file was @generated by uv. Do not edit by hand.
version = 1
revision = 3
requires-python = ">=3.11, <3.13"
Expand Down
Loading
Loading