diff --git a/testing/resources/arbitrary_bytes_repo/python3_hook/main.py b/testing/resources/arbitrary_bytes_repo/python3_hook.py similarity index 96% rename from testing/resources/arbitrary_bytes_repo/python3_hook/main.py rename to testing/resources/arbitrary_bytes_repo/python3_hook.py index c6a5547c..ba698a93 100644 --- a/testing/resources/arbitrary_bytes_repo/python3_hook/main.py +++ b/testing/resources/arbitrary_bytes_repo/python3_hook.py @@ -5,7 +5,7 @@ from __future__ import unicode_literals import sys -def func(): +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') diff --git a/testing/resources/arbitrary_bytes_repo/python3_hook/__init__.py b/testing/resources/arbitrary_bytes_repo/python3_hook/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/testing/resources/arbitrary_bytes_repo/setup.py b/testing/resources/arbitrary_bytes_repo/setup.py index bf7690c0..c780e427 100644 --- a/testing/resources/arbitrary_bytes_repo/setup.py +++ b/testing/resources/arbitrary_bytes_repo/setup.py @@ -1,11 +1,8 @@ -from setuptools import find_packages from setuptools import setup setup( name='python3_hook', version='0.0.0', - packages=find_packages('.'), - entry_points={ - 'console_scripts': ['python3-hook = python3_hook.main:func'], - }, + py_modules=['python3_hook'], + entry_points={'console_scripts': ['python3-hook=python3_hook:main']}, )