From 2946c02b2565cf9c1a26519e86cdd906610aad63 Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Sun, 9 Jun 2024 22:51:15 -0400 Subject: [PATCH] Add typos enforcement to CI --- .github/workflows/check.yaml | 6 ++++++ _typos.toml | 4 ++++ scenarios/excluded.json | 2 +- scenarios/prereleases.json | 2 +- src/packse/cli.py | 4 ++-- src/packse/template.py | 2 +- vendor/README.md | 2 +- 7 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 _typos.toml diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 63a04a04..f6a39563 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -55,3 +55,9 @@ jobs: run: | poetry check poetry lock --check + + typos: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: crate-ci/typos@master diff --git a/_typos.toml b/_typos.toml new file mode 100644 index 00000000..6d531715 --- /dev/null +++ b/_typos.toml @@ -0,0 +1,4 @@ +[files] +extend-exclude = [ + "**/__snapshots__/", +] diff --git a/scenarios/excluded.json b/scenarios/excluded.json index 03f6ca41..13feeb30 100644 --- a/scenarios/excluded.json +++ b/scenarios/excluded.json @@ -135,7 +135,7 @@ }, { "name": "dependency-excludes-non-contiguous-range-of-compatible-versions", - "description": "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 `d`.", + "description": "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-existent package `d`.", "root": { "requires": [ "a", diff --git a/scenarios/prereleases.json b/scenarios/prereleases.json index d8ef6294..b40a4253 100644 --- a/scenarios/prereleases.json +++ b/scenarios/prereleases.json @@ -539,7 +539,7 @@ "packages": { "a": "0.1.0a1" }, - "explanation": "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 the boundary should not be selected." + "explanation": "Since there are only prerelease versions of `a` available, a prerelease is allowed. Since the user did not explicitly request a pre-release, pre-releases at the boundary should not be selected." } }, { diff --git a/src/packse/cli.py b/src/packse/cli.py index 9446b4d8..80e12cea 100644 --- a/src/packse/cli.py +++ b/src/packse/cli.py @@ -401,7 +401,7 @@ def _add_serve_parser(subparsers): parser.add_argument( "--offline", action="store_true", - help="Run the index servers without fallback acccess to the real PyPI.", + help="Run the index servers without fallback access to the real PyPI.", ) _add_shared_arguments(parser) @@ -444,7 +444,7 @@ def _add_index_parser(subparsers): up.add_argument( "--offline", action="store_true", - help="Run the index server without acccess to the real PyPI.", + help="Run the index server without access to the real PyPI.", ) up.set_defaults(call=_call_index_up) diff --git a/src/packse/template.py b/src/packse/template.py index e8642015..927d3f36 100644 --- a/src/packse/template.py +++ b/src/packse/template.py @@ -72,7 +72,7 @@ def create_from_template( def parse_loop(path: Path, variables: dict[str, Any]): - # This implementatation is pretty dubious and certain to fail on edge-cases + # This implementation is pretty dubious and certain to fail on edge-cases scope = variables scopes = [] matches = re.findall(r"\[\[(.*?)\]\]", str(path)) diff --git a/vendor/README.md b/vendor/README.md index 3117db24..9131ca4c 100644 --- a/vendor/README.md +++ b/vendor/README.md @@ -1,4 +1,4 @@ # Vendored build dependencies -This directoy contains vendored build dependencies for running a package index in offline mode while allowing +This directory contains vendored build dependencies for running a package index in offline mode while allowing package scenarios to be built and installed.