From 27ea01705820de9d82c836789edddc8d6529b5e2 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Sun, 4 Sep 2022 10:44:22 +0200 Subject: [PATCH] Feat: Remove rst_check --- clean_rst/__init__.py | 2 +- clean_rst/main.py | 10 +--------- pyproject.toml | 2 +- tests/test_clean_rst.py | 2 +- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/clean_rst/__init__.py b/clean_rst/__init__.py index ae73625..bbab024 100644 --- a/clean_rst/__init__.py +++ b/clean_rst/__init__.py @@ -1 +1 @@ -__version__ = "0.1.3" +__version__ = "0.1.4" diff --git a/clean_rst/main.py b/clean_rst/main.py index 30fe05c..c18fa6e 100644 --- a/clean_rst/main.py +++ b/clean_rst/main.py @@ -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) diff --git a/pyproject.toml b/pyproject.toml index f8ed91d..12ccda0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 "] diff --git a/tests/test_clean_rst.py b/tests/test_clean_rst.py index 0747ded..9dc4bac 100644 --- a/tests/test_clean_rst.py +++ b/tests/test_clean_rst.py @@ -2,4 +2,4 @@ from clean_rst import __version__ def test_version(): - assert __version__ == "0.1.3" + assert __version__ == "0.1.4"