mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Clean up calls to .encode() / .decode()
This commit is contained in:
parent
b2faf339ce
commit
aefbe71765
11 changed files with 17 additions and 18 deletions
|
|
@ -69,7 +69,7 @@ def is_in_merge_conflict() -> bool:
|
|||
def parse_merge_msg_for_conflicts(merge_msg: bytes) -> List[str]:
|
||||
# Conflicted files start with tabs
|
||||
return [
|
||||
line.lstrip(b'#').strip().decode('UTF-8')
|
||||
line.lstrip(b'#').strip().decode()
|
||||
for line in merge_msg.splitlines()
|
||||
# '#\t' for git 2.4.1
|
||||
if line.startswith((b'\t', b'#\t'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue