mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:56 +00:00
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:
parent
ef45185dbc
commit
c3b40da0d2
22 changed files with 156 additions and 156 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue