diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d3bb10b..2a15d6a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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: diff --git a/pyproject.toml b/pyproject.toml index f31e7ca..6d27f0f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 diff --git a/setup.py b/setup.py index b913034..e298999 100755 --- a/setup.py +++ b/setup.py @@ -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 diff --git a/src/deprecate/deprecation.py b/src/deprecate/deprecation.py index 5c81f9f..69a4a42 100644 --- a/src/deprecate/deprecation.py +++ b/src/deprecate/deprecation.py @@ -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."