Feat: Remove rst_check

This commit is contained in:
Bertrand Benjamin 2022-09-04 10:44:22 +02:00
parent 7d91ac3206
commit 27ea017058
4 changed files with 4 additions and 12 deletions

View File

@ -1 +1 @@
__version__ = "0.1.3"
__version__ = "0.1.4"

View File

@ -126,13 +126,7 @@ NORMALIZERS_NEW = {
@click.command()
@click.argument("commited_files", nargs=-1)
@click.option(
"--ignore_directive",
multiple=True,
default=[],
help="List of ignored directives for restructuredtext_lint",
)
def main(commited_files: list, ignore_directive: list) -> int:
def main(commited_files: list) -> int:
r = Repo()
diff = get_commited_files(r)
@ -142,11 +136,9 @@ def main(commited_files: list, ignore_directive: list) -> int:
# New files
for f in select_by_extension(diff["A"], "rst"):
errors += rst_lint(f, ignore_directives=ignore_directive)
modified += normalize_file(f, NORMALIZERS_NEW)
# Modified files
for f in select_by_extension(diff["M"], "rst"):
errors += rst_lint(f, ignore_directives=ignore_directive)
modified += normalize_file(f, NORMALIZERS_MODIFIED)
return int(len(errors) > 0)

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "clean-rst"
version = "0.1.3"
version = "0.1.4"
description = "pre-commit to clean rst index files"
authors = ["Bertrand Benjamin <benjamin.bertrand@opytex.org>"]

View File

@ -2,4 +2,4 @@ from clean_rst import __version__
def test_version():
assert __version__ == "0.1.3"
assert __version__ == "0.1.4"