Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add codespell support (config, workflow to detect/not fix) and make it fix few typos #416

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Codespell configuration is within setup.cfg
---
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@v4
- name: Annotate locations with typos
uses: codespell-project/codespell-problem-matcher@v1
- name: Codespell
uses: codespell-project/actions-codespell@v2
2 changes: 1 addition & 1 deletion billiard/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def set_pdeathsig(sig):
libc = ctypes.cdll.LoadLibrary("libc.so.6")
libc.prctl(PR_SET_PDEATHSIG, ctypes.c_int(sig))
except Exception as e:
raise OSError("An error occured while setting pdeathsig") from e
raise OSError("An error occurred while setting pdeathsig") from e

def _eintr_retry(func):
'''
Expand Down
7 changes: 7 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@ ignore = D102,D104,D203,D105,D213

[metadata]
license_file = LICENSE.txt

[codespell]
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
skip = .git*
check-hidden = true
# ignore-regex =
ignore-words-list = assertin
4 changes: 2 additions & 2 deletions t/integration/tests/test_multiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from billiard._ext import _billiard
except ImportError as exc:
raise pytest.skip(exc)
# import threading after _billiard to raise a more revelant error
# import threading after _billiard to raise a more relevant error
# message: "No module named _billiard". _billiard is not compiled
# without thread support.
import threading
Expand Down Expand Up @@ -750,7 +750,7 @@ def test_event(self):
event = self.Event()
wait = TimingWrapper(event.wait)

# Removed temporaily, due to API shear, this does not
# Removed temporarily, due to API shear, this does not
# work with threading._Event objects. is_set == isSet
self.assertEqual(event.is_set(), False)

Expand Down
Loading