Skip to content

Commit

Permalink
precommit: enable codespell
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Oct 1, 2023
1 parent b2b8671 commit e4ae21f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ repos:
args: ["--py37-plus"]
name: Upgrade code

- repo: https://github.com/codespell-project/codespell
rev: v2.2.5
hooks:
- id: codespell
additional_dependencies: [tomli]
args: ["--write-changes"] # uncomment if you want to get automatic fixing

#- repo: https://github.com/PyCQA/docformatter
# rev: v1.5.1
# hooks:
Expand Down
11 changes: 10 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,21 @@ exclude_lines = [
"pragma: no cover",
"pass",
]

[tool.coverage.run]
parallel = true
relative_files = true


[tool.codespell]
#skip = '*.py'
quiet-level = 3
# comma separated list of words; waiting for:
# https://github.com/codespell-project/codespell/issues/2839#issuecomment-1731601603
# also adding links until they ignored by its: nature
# https://github.com/codespell-project/codespell/issues/2243#issuecomment-1732019960
#ignore-words-list = ""


[tool.black]
# https://github.com/psf/black
line-length = 120
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def _load_py_module(fname: str, pkg: str = "deprecate"):

def _load_long_description(path_dir: str, version: str) -> str:
path_readme = os.path.join(path_dir, "README.md")
with open(path_readme, encoding="utf-8") as fo:
text = fo.read()
with open(path_readme, encoding="utf-8") as fopen:
text = fopen.read()
# codecov badge
text = text.replace("/branch/main/graph/badge.svg", f"/release/{version}/graph/badge.svg")
# replace github badges for release ones
Expand Down
2 changes: 1 addition & 1 deletion src/deprecate/deprecation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from deprecate.utils import get_func_arguments_types_defaults

#: Default template warning message fot redirecting callable
#: Default template warning message for redirecting callable
TEMPLATE_WARNING_CALLABLE = (
"The `%(source_name)s` was deprecated since v%(deprecated_in)s in favor of `%(target_path)s`."
" It will be removed in v%(remove_in)s."
Expand Down

0 comments on commit e4ae21f

Please sign in to comment.