From 62bba8742a71d8b40008637df11c60366bb2cdd8 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 27 Nov 2024 10:28:13 -0500 Subject: [PATCH 1/3] Add github action to codespell master on push and PRs --- .github/workflows/codespell.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/codespell.yml diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml new file mode 100644 index 0000000..e21712e --- /dev/null +++ b/.github/workflows/codespell.yml @@ -0,0 +1,25 @@ +# Codespell configuration is within pyproject.toml +--- +name: Codespell + +on: + push: + branches: [master] + pull_request: + branches: [master] + +permissions: + contents: read + +jobs: + codespell: + name: Check for spelling errors + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Annotate locations with typos + uses: codespell-project/codespell-problem-matcher@v1 + - name: Codespell + uses: codespell-project/actions-codespell@v2 From c58b02e39ad111fcf31e4cf103d03c1a92c153d9 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 27 Nov 2024 10:28:13 -0500 Subject: [PATCH 2/3] Add rudimentary codespell config --- pyproject.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 68847bb..be19f0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,10 @@ [build-system] requires = ["setuptools >= 61.0"] build-backend = "setuptools.build_meta" + +[tool.codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = '.git*,*.svg' +check-hidden = true +ignore-regex = '\bHDA\b' +# ignore-words-list = '' From 2bf04d0867a0ca4ebfb3f3f929f1a9b607db1b32 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 27 Nov 2024 10:31:25 -0500 Subject: [PATCH 3/3] [DATALAD RUNCMD] run codespell throughout fixing few left typos automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ --- examples/asyncio_generators.py | 2 +- sounddevice.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/asyncio_generators.py b/examples/asyncio_generators.py index 463a650..be5f5a6 100755 --- a/examples/asyncio_generators.py +++ b/examples/asyncio_generators.py @@ -84,7 +84,7 @@ async def wire_coro(**kwargs): async def main(**kwargs): - print('Some informations about the input signal:') + print('Some information about the input signal:') try: await asyncio.wait_for(print_input_infos(), timeout=2) except asyncio.TimeoutError: diff --git a/sounddevice.py b/sounddevice.py index 28d31a9..7963ab8 100644 --- a/sounddevice.py +++ b/sounddevice.py @@ -2486,7 +2486,7 @@ def __init__(self, exclusive=False, auto_convert=False): class _CallbackContext: - """Helper class for re-use in play()/rec()/playrec() callbacks.""" + """Helper class for reuse in play()/rec()/playrec() callbacks.""" blocksize = None data = None