Skip to content

Commit 3328199

Browse files
authored
Merge branch 'main' into feat/show-detailed-changes-when-using-w-flag
2 parents 3ff86ed + 09c0976 commit 3328199

4 files changed

Lines changed: 32 additions & 4 deletions

File tree

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ repos:
5858
- -d
5959
- "{extends: relaxed, rules: {line-length: {max: 90}}}"
6060
- repo: https://github.com/astral-sh/ruff-pre-commit
61-
rev: v0.14.3
61+
rev: v0.14.7
6262
hooks:
6363
- id: ruff-check
6464
- id: ruff-format
6565
- repo: https://github.com/rbubley/mirrors-prettier
66-
rev: v3.6.2
66+
rev: v3.7.3
6767
hooks:
6868
- id: prettier
6969
types_or: [yaml, markdown, html, css, scss, javascript, json]
@@ -79,7 +79,7 @@ repos:
7979
hooks:
8080
- id: validate-pyproject
8181
- repo: https://github.com/pre-commit/mirrors-mypy
82-
rev: v1.18.2
82+
rev: v1.19.0
8383
hooks:
8484
- id: mypy
8585
args: ["--config-file", "pyproject.toml"]

codespell_lib/data/dictionary.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31382,6 +31382,12 @@ hyperboly->hyperbole
3138231382
Hyperldger->Hyperledger
3138331383
hypervior->hypervisor
3138431384
hyphenatin->hyphenating, hyphenation,
31385+
hypocencter->hypocenter
31386+
hypocenctre->hypocentre
31387+
hypocengter->hypocenter
31388+
hypocengtre->hypocentre
31389+
hypocnter->hypocenter
31390+
hypocntre->hypocentre
3138531391
hypocracy->hypocrisy
3138631392
hypocrasy->hypocrisy
3138731393
hypocricy->hypocrisy
@@ -49867,6 +49873,8 @@ relfects->reflects
4986749873
reliabe->reliable
4986849874
reliabily->reliably, reliability,
4986949875
reliablity->reliability
49876+
relibility->reliability
49877+
relible->reliable
4987049878
relie->rely, relies, really, relief,
4987149879
reliefed->relieved
4987249880
reliefes->relieves
@@ -61967,6 +61975,11 @@ unreigstering->unregistering
6196761975
unreigsters->unregisters
6196861976
unrelatd->unrelated
6196961977
unreleated->unrelated
61978+
unreliabe->unreliable
61979+
unreliabily->unreliably, unreliability,
61980+
unreliablity->unreliability
61981+
unrelibility->unreliability
61982+
unrelible->unreliable
6197061983
unrelted->unrelated
6197161984
unrelyable->unreliable
6197261985
unrelying->underlying

codespell_lib/data/dictionary_rare.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ infarction->infraction
147147
infarctions->infractions
148148
ingenuous->ingenious
149149
inly->only
150+
insteam->instead
150151
intensional->intentional
151152
irregardless->regardless
152153
joo->you

codespell_lib/tests/test_basic.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@ def run_codespell_stdin(
14541454
return output.count("\n")
14551455

14561456

1457-
def test_stdin(tmp_path: Path) -> None:
1457+
def test_stdin(tmp_path: Path, capsys: pytest.CaptureFixture[str]) -> None:
14581458
"""Test running the codespell executable."""
14591459
input_file_lines = 4
14601460
text = ""
@@ -1469,3 +1469,17 @@ def test_stdin(tmp_path: Path) -> None:
14691469
assert run_codespell_stdin(
14701470
text, args=args, cwd=tmp_path
14711471
) == input_file_lines * (2 - int(single_line_per_error))
1472+
1473+
with FakeStdin("Thsi is a line"):
1474+
result = cs.main("-", "-w", std=True)
1475+
assert isinstance(result, tuple)
1476+
code, stdout, _ = result
1477+
assert stdout == "---\nThis is a line"
1478+
assert code == 0
1479+
1480+
with FakeStdin("Thsi is a line"):
1481+
result = cs.main("-", "--stdin-single-line", std=True)
1482+
assert isinstance(result, tuple)
1483+
code, stdout, _ = result
1484+
assert stdout == "1: Thsi ==> This\n"
1485+
assert code == 1

0 commit comments

Comments
 (0)