mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-06-29 06:00:45 +00:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
e31319b3e3
commit
e384faeea5
2 changed files with 5 additions and 4 deletions
|
|
@ -7,7 +7,6 @@ in commit-msg stage) and checks that it contains a valid
|
||||||
This is a pure Python implementation with no external dependencies —
|
This is a pure Python implementation with no external dependencies —
|
||||||
only the standard library is used (``re``, ``sys``).
|
only the standard library is used (``re``, ``sys``).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
@ -32,7 +31,7 @@ def check_dco(commit_msg_path: str) -> tuple[int, list[str]]:
|
||||||
|
|
||||||
Returns (exit_code, diagnostic_messages).
|
Returns (exit_code, diagnostic_messages).
|
||||||
"""
|
"""
|
||||||
with open(commit_msg_path, 'r', encoding='utf-8') as f:
|
with open(commit_msg_path, encoding='utf-8') as f:
|
||||||
lines = f.read().splitlines()
|
lines = f.read().splitlines()
|
||||||
|
|
||||||
errors: list[str] = []
|
errors: list[str] = []
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,12 @@
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import pytest
|
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from pre_commit_hooks.check_dco import check_dco, main
|
import pytest
|
||||||
|
|
||||||
|
from pre_commit_hooks.check_dco import check_dco
|
||||||
|
from pre_commit_hooks.check_dco import main
|
||||||
|
|
||||||
|
|
||||||
def _write_commit_msg(content: str) -> str:
|
def _write_commit_msg(content: str) -> str:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue