Adding codespell checks and workflow (#287)

This commit is contained in:
Yaroslav Halchenko
2023-06-17 22:39:12 -04:00
committed by GitHub
parent 15b85989fe
commit 3e493e80e2
5 changed files with 30 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
---
name: Codespell
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Codespell
uses: codespell-project/actions-codespell@v2
+5
View File
@@ -52,6 +52,7 @@ test = [
"black == 23.1.0",
"mypy == 1.1.1",
"types-requests == 2.28.11.17",
"codespell >= 2.2.5, < 3.0.0"
]
dev = [
"ruff == 0.0.256",
@@ -93,3 +94,7 @@ ignore = [
"C901", # too complex.
"B008", # do not perform function calls in argument defaults.
]
[tool.codespell]
skip = '.git,venv'
# ignore-words-list = ''
+1
View File
@@ -4,3 +4,4 @@ set -x
ruff sgpt tests scripts --fix
black sgpt tests scripts
isort sgpt tests scripts
codespell --write-changes
+1
View File
@@ -7,3 +7,4 @@ mypy sgpt
ruff sgpt tests scripts
black sgpt tests --check
isort sgpt tests scripts --check-only
codespell
+1 -1
View File
@@ -446,6 +446,6 @@ class TestShellGpt(TestCase):
}
result = runner.invoke(app, self.get_arguments(**dict_arguments), input="d\n")
assert result.exit_code == 0
# Cant really test it since stdin in disable for --shell flag.
# Can't really test it since stdin in disable for --shell flag.
# for word in ("prints", "hello", "console"):
# assert word in result.stdout