Fix existing typos and enable typos in CI (#4184)

This commit is contained in:
Charlie Marsh 2024-06-09 18:50:54 -07:00 committed by GitHub
parent 04717e1a92
commit e7c573cfcb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 22 additions and 14 deletions

View file

@ -291,6 +291,12 @@ jobs:
RUSTUP_HOME: ${{ env.DEV_DRIVE }}/.rustup
run: cargo build --release --target x86_64-pc-windows-msvc
typos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@master
build-binary-linux:
runs-on:
labels: ubuntu-latest-large

View file

@ -18,7 +18,7 @@
### Bug fixes
- Fix `uv venv` handling when `VIRTUAL_ENV` refers to an non-existant environment ([#4073](https://github.com/astral-sh/uv/pull/4073))
- Fix `uv venv` handling when `VIRTUAL_ENV` refers to an non-existent environment ([#4073](https://github.com/astral-sh/uv/pull/4073))
## 0.2.7

View file

@ -11,6 +11,8 @@ extend-ignore-re = [
"FrIeNdLy-\\._\\.-bArD",
"I borken you cache",
"eb1ba5f5",
"github_pat_[0-9a-zA-Z_]+",
"LICENSEs",
]
[default.extend-identifiers]

View file

@ -179,8 +179,8 @@ pub fn uninstall_egg(egg_info: &Path) -> Result<Uninstall, Error> {
}
// Remove as a `.py`, `.pyc`, or `.pyo` file.
for exten in &["py", "pyc", "pyo"] {
let path = path.with_extension(exten);
for extension in &["py", "pyc", "pyo"] {
let path = path.with_extension(extension);
match fs_err::remove_file(&path) {
Ok(()) => {
debug!("Removed file: {}", path.display());

View file

@ -1712,8 +1712,8 @@ impl<'a> From<ResolvedDistRef<'a>> for Request {
// N.B. This is almost identical to `ResolvedDistRef::to_owned`, but
// creates a `Request` instead of a `ResolvedDist`. There's probably
// some room for DRYing this up a bit. The obvious way would be to
// add a method to create a `Dist`, but a `Dist` cannot reprented an
// installed dist.
// add a method to create a `Dist`, but a `Dist` cannot be represented
// as an installed dist.
match dist {
ResolvedDistRef::InstallableRegistrySourceDist { sdist, prioritized } => {
// This is okay because we're only here if the prioritized dist

View file

@ -150,7 +150,7 @@ mod tests {
let mut run_vars = vec![
// Ensure `PATH` is used
("UV_TEST_PYTHON_PATH", None),
// Ignore active virtual envrionments (i.e. that the dev is using)
// Ignore active virtual environments (i.e. that the dev is using)
("VIRTUAL_ENV", None),
("PATH", path.as_deref()),
// Use the temporary toolchain directory
@ -1292,7 +1292,7 @@ mod tests {
assert_eq!(
toolchain.interpreter().python_full_version().to_string(),
"3.10.0",
"We should find the named executbale"
"We should find the named executable"
);
let result = context.run(|| {
@ -1478,7 +1478,7 @@ mod tests {
"We should find the absolute venv path"
);
// We should allow it to be a directory that _looks_ like a virtual environmnet
// We should allow it to be a directory that _looks_ like a virtual environment.
let python = context.tempdir.child("bar").join("bin").join("python");
TestContext::create_mock_interpreter(
&python,

View file

@ -33,7 +33,7 @@ impl Toolchain {
} else if system.is_preferred() {
Self::find_default(preview, cache)
} else {
// First check for a parent intepreter
// First check for a parent interpreter
// We gate this check to avoid an extra log message when it is not set
if std::env::var_os("UV_INTERNAL__PARENT_INTERPRETER").is_some() {
match Self::find_parent_interpreter(system, cache) {

View file

@ -45,8 +45,8 @@ pub(crate) async fn run(
.chain(with.into_iter().map(RequirementsSource::from_package))
.collect::<Vec<_>>();
// TODO(zanieb): When implementing project-level tools, discover the project and check if it has the tool
// TOOD(zanieb): Determine if we sould layer on top of the project environment if it is present
// TODO(zanieb): When implementing project-level tools, discover the project and check if it has the tool.
// TODO(zanieb): Determine if we should layer on top of the project environment if it is present.
// If necessary, create an environment for the ephemeral requirements.
debug!("Syncing ephemeral environment.");

View file

@ -501,7 +501,7 @@ fn dependency_excludes_range_of_compatible_versions() {
/// There is a non-contiguous range of compatible versions for the requested package
/// `a`, but another dependency `c` excludes the range. This is the same as
/// `dependency-excludes-range-of-compatible-versions` but some of the versions of
/// `a` are incompatible for another reason e.g. dependency on non-existant package
/// `a` are incompatible for another reason e.g. dependency on non-existent package
/// `d`.
///
/// ```text
@ -3530,7 +3530,7 @@ fn package_only_prereleases_boundary() {
"###);
// Since there are only prerelease versions of `a` available, a prerelease is
// allowed. Since the user did not explictly request a pre-release, pre-releases at
// allowed. Since the user did not explicitly request a pre-release, pre-releases at
// the boundary should not be selected.
assert_installed(
&context.venv,

View file

@ -164,7 +164,7 @@ fn create_venv_defaults_to_cwd() {
#[test]
fn create_venv_ignores_virtual_env_variable() {
let context = VenvTestContext::new(&["3.12"]);
// We shouldn't care if `VIRTUAL_ENV` is set to an non-existant directory
// We shouldn't care if `VIRTUAL_ENV` is set to an non-existent directory
// because we ignore virtual environment interpreter sources (we require a system interpreter)
uv_snapshot!(context.filters(), context.venv_command()
.env("VIRTUAL_ENV", context.temp_dir.child("does-not-exist").as_os_str()), @r###"