mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-02 10:56:52 +00:00
Add pyupgrade
This commit is contained in:
parent
a11d9314b2
commit
9cee71b5df
19 changed files with 33 additions and 29 deletions
|
|
@ -27,16 +27,16 @@ def check_docstring_first(src, filename='<unknown>'):
|
|||
if tok_type == tokenize.STRING and scol == 0:
|
||||
if found_docstring_line is not None:
|
||||
print(
|
||||
'{0}:{1} Multiple module docstrings '
|
||||
'(first docstring on line {2}).'.format(
|
||||
'{}:{} Multiple module docstrings '
|
||||
'(first docstring on line {}).'.format(
|
||||
filename, sline, found_docstring_line,
|
||||
)
|
||||
)
|
||||
return 1
|
||||
elif found_code_line is not None:
|
||||
print(
|
||||
'{0}:{1} Module docstring appears after code '
|
||||
'(code seen on line {2}).'.format(
|
||||
'{}:{} Module docstring appears after code '
|
||||
'(code seen on line {}).'.format(
|
||||
filename, sline, found_code_line,
|
||||
)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue