mirror of
https://github.com/TheR1D/shell_gpt.git
synced 2026-07-03 14:10:18 +02:00
Adding codespell checks and workflow (#287)
This commit is contained in:
committed by
GitHub
parent
15b85989fe
commit
3e493e80e2
@@ -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
|
||||
@@ -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 = ''
|
||||
|
||||
@@ -4,3 +4,4 @@ set -x
|
||||
ruff sgpt tests scripts --fix
|
||||
black sgpt tests scripts
|
||||
isort sgpt tests scripts
|
||||
codespell --write-changes
|
||||
|
||||
@@ -7,3 +7,4 @@ mypy sgpt
|
||||
ruff sgpt tests scripts
|
||||
black sgpt tests --check
|
||||
isort sgpt tests scripts --check-only
|
||||
codespell
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user