mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 12:06:53 +00:00
Fix CI by upgrading AP templates
This commit is contained in:
parent
31853d6c43
commit
fea76b9ea1
8 changed files with 39 additions and 34 deletions
|
|
@ -25,9 +25,11 @@ def has_coding(line): # type: (bytes) -> bool
|
|||
)
|
||||
|
||||
|
||||
class ExpectedContents(collections.namedtuple(
|
||||
'ExpectedContents', ('shebang', 'rest', 'pragma_status', 'ending'),
|
||||
)):
|
||||
class ExpectedContents(
|
||||
collections.namedtuple(
|
||||
'ExpectedContents', ('shebang', 'rest', 'pragma_status', 'ending'),
|
||||
),
|
||||
):
|
||||
"""
|
||||
pragma_status:
|
||||
- True: has exactly the coding pragma expected
|
||||
|
|
@ -138,9 +140,11 @@ def main(argv=None): # type: (Optional[Sequence[str]]) -> int
|
|||
)
|
||||
retv |= file_ret
|
||||
if file_ret:
|
||||
print(fmt.format(
|
||||
pragma=args.pragma.decode(), filename=filename,
|
||||
))
|
||||
print(
|
||||
fmt.format(
|
||||
pragma=args.pragma.decode(), filename=filename,
|
||||
),
|
||||
)
|
||||
|
||||
return retv
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue