Feat: Remove rst_check
This commit is contained in:
parent
7d91ac3206
commit
27ea017058
@ -1 +1 @@
|
||||
__version__ = "0.1.3"
|
||||
__version__ = "0.1.4"
|
||||
|
@ -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)
|
||||
|
@ -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>"]
|
||||
|
||||
|
@ -2,4 +2,4 @@ from clean_rst import __version__
|
||||
|
||||
|
||||
def test_version():
|
||||
assert __version__ == "0.1.3"
|
||||
assert __version__ == "0.1.4"
|
||||
|
Loading…
Reference in New Issue
Block a user