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

@ -36,14 +36,14 @@ pub(crate) fn resolve_module_query<'db>(
let _span = tracing::trace_span!("resolve_module", %name).entered();
let Some((search_path, module_file, kind)) = resolve_name(db, name) else {
tracing::debug!("Module '{name}' not found in the search paths.");
tracing::debug!("Module `{name}` not found in search paths");
return None;
};
let module = Module::new(name.clone(), kind, search_path, module_file);
tracing::trace!(
"Resolved module '{name}' to '{path}'.",
"Resolved module `{name}` to `{path}`",
path = module_file.path(db)
);
@ -324,7 +324,7 @@ pub(crate) fn dynamic_resolution_paths(db: &dyn Db) -> Vec<SearchPath> {
let site_packages_root = files
.root(db.upcast(), site_packages_dir)
.expect("Site-package root to have been created.");
.expect("Site-package root to have been created");
// This query needs to be re-executed each time a `.pth` file
// is added, modified or removed from the `site-packages` directory.