mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-18 00:24:47 +04:00
Simplify setup.py in arbitrary_bytes_repo
This commit is contained in:
parent
d4a25b2ecf
commit
51cf46e660
3 changed files with 3 additions and 6 deletions
13
testing/resources/arbitrary_bytes_repo/python3_hook.py
Normal file
13
testing/resources/arbitrary_bytes_repo/python3_hook.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import print_function
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
# Intentionally write mixed encoding to the output. This should not crash
|
||||
# pre-commit and should write bytes to the output.
|
||||
sys.stdout.buffer.write('☃'.encode('UTF-8') + '²'.encode('latin1') + b'\n')
|
||||
# Return 1 to trigger printing
|
||||
return 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue