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 RUSTUP_HOME: ${{ env.DEV_DRIVE }}/.rustup
run: cargo build --release --target x86_64-pc-windows-msvc 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: build-binary-linux:
runs-on: runs-on:
labels: ubuntu-latest-large labels: ubuntu-latest-large

View file

@ -18,7 +18,7 @@
### Bug fixes ### 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 ## 0.2.7

View file

@ -11,6 +11,8 @@ extend-ignore-re = [
"FrIeNdLy-\\._\\.-bArD", "FrIeNdLy-\\._\\.-bArD",
"I borken you cache", "I borken you cache",
"eb1ba5f5", "eb1ba5f5",
"github_pat_[0-9a-zA-Z_]+",
"LICENSEs",
] ]
[default.extend-identifiers] [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. // Remove as a `.py`, `.pyc`, or `.pyo` file.
for exten in &["py", "pyc", "pyo"] { for extension in &["py", "pyc", "pyo"] {
let path = path.with_extension(exten); let path = path.with_extension(extension);
match fs_err::remove_file(&path) { match fs_err::remove_file(&path) {
Ok(()) => { Ok(()) => {
debug!("Removed file: {}", path.display()); 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 // N.B. This is almost identical to `ResolvedDistRef::to_owned`, but
// creates a `Request` instead of a `ResolvedDist`. There's probably // creates a `Request` instead of a `ResolvedDist`. There's probably
// some room for DRYing this up a bit. The obvious way would be to // 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 // add a method to create a `Dist`, but a `Dist` cannot be represented
// installed dist. // as an installed dist.
match dist { match dist {
ResolvedDistRef::InstallableRegistrySourceDist { sdist, prioritized } => { ResolvedDistRef::InstallableRegistrySourceDist { sdist, prioritized } => {
// This is okay because we're only here if the prioritized dist // 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![ let mut run_vars = vec![
// Ensure `PATH` is used // Ensure `PATH` is used
("UV_TEST_PYTHON_PATH", None), ("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), ("VIRTUAL_ENV", None),
("PATH", path.as_deref()), ("PATH", path.as_deref()),
// Use the temporary toolchain directory // Use the temporary toolchain directory
@ -1292,7 +1292,7 @@ mod tests {
assert_eq!( assert_eq!(
toolchain.interpreter().python_full_version().to_string(), toolchain.interpreter().python_full_version().to_string(),
"3.10.0", "3.10.0",
"We should find the named executbale" "We should find the named executable"
); );
let result = context.run(|| { let result = context.run(|| {
@ -1478,7 +1478,7 @@ mod tests {
"We should find the absolute venv path" "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"); let python = context.tempdir.child("bar").join("bin").join("python");
TestContext::create_mock_interpreter( TestContext::create_mock_interpreter(
&python, &python,

View file

@ -33,7 +33,7 @@ impl Toolchain {
} else if system.is_preferred() { } else if system.is_preferred() {
Self::find_default(preview, cache) Self::find_default(preview, cache)
} else { } 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 // 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() { if std::env::var_os("UV_INTERNAL__PARENT_INTERPRETER").is_some() {
match Self::find_parent_interpreter(system, cache) { 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)) .chain(with.into_iter().map(RequirementsSource::from_package))
.collect::<Vec<_>>(); .collect::<Vec<_>>();
// TODO(zanieb): When implementing project-level tools, discover the project and check if it has the tool // 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): Determine if we should layer on top of the project environment if it is present.
// If necessary, create an environment for the ephemeral requirements. // If necessary, create an environment for the ephemeral requirements.
debug!("Syncing ephemeral environment."); 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 /// 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 /// `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 /// `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`. /// `d`.
/// ///
/// ```text /// ```text
@ -3530,7 +3530,7 @@ fn package_only_prereleases_boundary() {
"###); "###);
// Since there are only prerelease versions of `a` available, a prerelease is // 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. // the boundary should not be selected.
assert_installed( assert_installed(
&context.venv, &context.venv,

View file

@ -164,7 +164,7 @@ fn create_venv_defaults_to_cwd() {
#[test] #[test]
fn create_venv_ignores_virtual_env_variable() { fn create_venv_ignores_virtual_env_variable() {
let context = VenvTestContext::new(&["3.12"]); 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) // because we ignore virtual environment interpreter sources (we require a system interpreter)
uv_snapshot!(context.filters(), context.venv_command() uv_snapshot!(context.filters(), context.venv_command()
.env("VIRTUAL_ENV", context.temp_dir.child("does-not-exist").as_os_str()), @r###" .env("VIRTUAL_ENV", context.temp_dir.child("does-not-exist").as_os_str()), @r###"