Skip to content

Commit

Permalink
Add typos spelling checker with the pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
skupriienko committed Nov 1, 2024
1 parent 06b7915 commit 0aa0a20
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 4 deletions.
9 changes: 7 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# Apply to all files without commiting:
# Apply to all files without committing:
# pre-commit run --all-files
# Update this file:
# pre-commit autoupdate
Expand Down Expand Up @@ -29,7 +29,7 @@ repos:
- id: check-vcs-permalinks
# Fail if staged files are above a certain size.
# To add a large file, use 'git lfs track <file>; git add <file> to track large files with
# git-lfs rather than commiting them directly to the git history
# git-lfs rather than committing them directly to the git history
- id: check-added-large-files
args: [ "--maxkb=500" ]
- id: fix-byte-order-marker
Expand Down Expand Up @@ -154,6 +154,11 @@ repos:
exclude: ^tests/
additional_dependencies: [".[toml]"]

- repo: https://github.com/crate-ci/typos
rev: v1.24.5
hooks:
- id: typos

# - repo: https://github.com/google/yapf
# rev: v0.40.2
# hooks:
Expand Down
1 change: 1 addition & 0 deletions environment-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@ dependencies:
- vulture
- scalene >=1.3.16
- snakeviz
- typos
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ tests = [

conda_build = ["conda-build"]

spelling = ["typos"]

other = ["toml"]


Expand Down
2 changes: 1 addition & 1 deletion samples/contacts_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def upload_the_csv():
def import_csv_content_to_a_list():
"""POST https://api.mailjet.com/v3/REST/csvimport"""
data = {
"ErrTreshold": "1",
"ErrThreshold": "1",
"ImportOptions": "",
"Method": "addnoforce",
"ContactsListID": "123456",
Expand Down
2 changes: 1 addition & 1 deletion tests/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from mailjet_rest.utils.version import get_version, VERSION


def test_version_lenght_equal_three() -> None:
def test_version_length_equal_three() -> None:
"""Verify that the tuple contains 3 items."""
assert len(VERSION) == 3

Expand Down

0 comments on commit 0aa0a20

Please sign in to comment.