Compare commits
3 Commits
0c3ee1c020
...
b32ba93c6e
Author | SHA1 | Date | |
---|---|---|---|
b32ba93c6e | |||
a657ccf491 | |||
8f55426524 |
5
.pre-commit-hooks.yaml
Normal file
5
.pre-commit-hooks.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
- id: clean-rst
|
||||
name: clean-rst
|
||||
description: Clean rst and verify dates
|
||||
entry: clean-rst
|
||||
language: python
|
@ -1 +1 @@
|
||||
__version__ = "0.1.0"
|
||||
__version__ = "0.1.1"
|
||||
|
@ -126,12 +126,10 @@ def main(argv: list[str] = None) -> int:
|
||||
for f in select_by_extension(diff["A"], "rst"):
|
||||
errors += rst_lint(f)
|
||||
modified += normalize_file(f, NORMALIZERS_NEW)
|
||||
r.index.add([f])
|
||||
# Modified files
|
||||
for f in select_by_extension(diff["M"], "rst"):
|
||||
errors += rst_lint(f)
|
||||
modified += normalize_file(f, NORMALIZERS_MODIFIED)
|
||||
r.index.add([f])
|
||||
|
||||
return int(len(errors) > 0)
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "clean-rst"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
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.0"
|
||||
assert __version__ == "0.1.1"
|
||||
|
Loading…
Reference in New Issue
Block a user