Use backticks for code in red-knot messages (#13599)

## Summary

...and remove periods from messages that don't span more than a single
sentence.

This is more consistent with how we present user-facing messages in uv
(which has a defined style guide).
This commit is contained in:
Charlie Marsh 2024-10-01 23:14:28 -04:00 committed by GitHub
parent ef45185dbc
commit c3b40da0d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 156 additions and 156 deletions

View file

@ -132,7 +132,7 @@ impl Files {
Err(_) => return Err(FileError::NotFound),
};
tracing::trace!("Adding vendored file '{}'", path);
tracing::trace!("Adding vendored file `{}`", path);
let file = File::builder(FilePath::Vendored(path.to_path_buf()))
.permissions(Some(0o444))
.revision(metadata.revision())
@ -406,17 +406,17 @@ impl File {
};
if file.status(db) != status {
tracing::debug!("Updating the status of '{}'", file.path(db),);
tracing::debug!("Updating the status of `{}`", file.path(db));
file.set_status(db).to(status);
}
if file.revision(db) != revision {
tracing::debug!("Updating the revision of '{}'", file.path(db));
tracing::debug!("Updating the revision of `{}`", file.path(db));
file.set_revision(db).to(revision);
}
if file.permissions(db) != permission {
tracing::debug!("Updating the permissions of '{}'", file.path(db),);
tracing::debug!("Updating the permissions of `{}`", file.path(db));
file.set_permissions(db).to(permission);
}
}
@ -450,7 +450,7 @@ impl VirtualFile {
/// Increments the revision of the underlying [`File`].
fn sync(&self, db: &mut dyn Db) {
let file = self.0;
tracing::debug!("Updating the revision of '{}'", file.path(db));
tracing::debug!("Updating the revision of `{}`", file.path(db));
let current_revision = file.revision(db);
file.set_revision(db)
.to(FileRevision::new(current_revision.as_u128() + 1));
@ -458,7 +458,7 @@ impl VirtualFile {
/// Closes the virtual file.
pub fn close(&self, db: &mut dyn Db) {
tracing::debug!("Closing virtual file '{}'", self.0.path(db));
tracing::debug!("Closing virtual file `{}`", self.0.path(db));
self.0.set_status(db).to(FileStatus::NotFound);
}
}