Skip to content

Commit 35b904a

Browse files
committed
black and flake8 (forgot to install pre-commit hook)
1 parent 2cc57aa commit 35b904a

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

flake8_rst_docstrings.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,12 +225,11 @@ def run(self):
225225
- ast.get_docstring(node, clean=False).count("\n")
226226
- 1
227227
)
228-
assert node.body[0].lineno >= 1 and start >= 0, (
229-
"Bad start line, node line number %i for: %s\n"
230-
% (
231-
node.body[0].lineno,
232-
docstring,
233-
)
228+
assert (
229+
node.body[0].lineno >= 1 and start >= 0
230+
), "Bad start line, node line number %i for: %s\n" % (
231+
node.body[0].lineno,
232+
docstring,
234233
)
235234
for rst_error in rst_errors:
236235
# TODO - make this a configuration option?

tests/RST220/dup_explicit_target.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@
2020
RST220/dup_explicit_target.py:15:1: RST220 Duplicate explicit target name: "single trailing underscore".
2121
2222
This file triggers an error when the implicitly named link is redefined.
23-
"""
23+
""" # noqa: E501
2424

2525
print("Hello world")

tests/test_all.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def test_version():
131131
out, err = p.communicate()
132132

133133
assert not p.returncode, err
134-
assert b"rst-docstrings:" in out or b"rst-\ndocstrings:" in out, (
135-
"should appear in flake8 version string"
136-
)
134+
assert (
135+
b"rst-docstrings:" in out or b"rst-\ndocstrings:" in out
136+
), "should appear in flake8 version string"
137137
assert not err

0 commit comments

Comments
 (0)