Skip to content

Commit

Permalink
Adding codespell checks and workflow (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
yarikoptic authored Jun 18, 2023
1 parent 15b8598 commit 3e493e8
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
22 changes: 22 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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 change: 1 addition & 0 deletions scripts/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ set -x
ruff sgpt tests scripts --fix
black sgpt tests scripts
isort sgpt tests scripts
codespell --write-changes
1 change: 1 addition & 0 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ mypy sgpt
ruff sgpt tests scripts
black sgpt tests --check
isort sgpt tests scripts --check-only
codespell
2 changes: 1 addition & 1 deletion tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,6 @@ def test_shell_command_run_description(self):
}
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

0 comments on commit 3e493e8

Please sign in to comment.