diff --git a/examples/src/python/example/python_distribution/hello/fasthello/hello_package/hello.py b/examples/src/python/example/python_distribution/hello/fasthello/hello_package/hello.py index c73faf08ee75..7e4164535daa 100644 --- a/examples/src/python/example/python_distribution/hello/fasthello/hello_package/hello.py +++ b/examples/src/python/example/python_distribution/hello/fasthello/hello_package/hello.py @@ -7,7 +7,6 @@ import c_greet import cpp_greet - def hello(): return '\n'.join([ c_greet.c_greet(), diff --git a/examples/src/python/example/python_distribution/hello/setup_requires/hello_package/hello.py b/examples/src/python/example/python_distribution/hello/setup_requires/hello_package/hello.py index d24910327fcf..1b02aa7db5cd 100644 --- a/examples/src/python/example/python_distribution/hello/setup_requires/hello_package/hello.py +++ b/examples/src/python/example/python_distribution/hello/setup_requires/hello_package/hello.py @@ -4,6 +4,5 @@ from __future__ import absolute_import, division, print_function, unicode_literals - def hello(): return 'Hello, world!' diff --git a/examples/src/python/example/python_distribution/hello/setup_requires/setup.py b/examples/src/python/example/python_distribution/hello/setup_requires/setup.py index 219f657f1cb7..217248181ab5 100644 --- a/examples/src/python/example/python_distribution/hello/setup_requires/setup.py +++ b/examples/src/python/example/python_distribution/hello/setup_requires/setup.py @@ -7,7 +7,7 @@ import os from setuptools import setup, find_packages -# We require pycountry with setup_requires argument to this setup script's +# We require pycountry with setup_requires argument to this setup script's # corresponding python_dist. import pycountry diff --git a/src/python/pants/backend/python/tasks/setup_py.py b/src/python/pants/backend/python/tasks/setup_py.py index bb180fd0e38e..cb5fe8fbd46b 100644 --- a/src/python/pants/backend/python/tasks/setup_py.py +++ b/src/python/pants/backend/python/tasks/setup_py.py @@ -8,7 +8,6 @@ import itertools import os import pprint -import re import shutil from abc import abstractmethod from builtins import map, object, str, zip @@ -168,12 +167,6 @@ class SetupPyExecutionEnvironment(datatype([ 'linux': lambda: ['-shared'], } - # A "local" extension to a version string, as per - # https://www.python.org/dev/peps/pep-0440/#local-version-identifiers - PEP_0440_DISALLOWED_LOCAL = re.compile(r'[^a-zA-Z0-9\.]') - # Replace all the disallowed characters with dots. - _local_version_replacer_char = '.' - def as_environment(self): ret = {} diff --git a/testprojects/src/python/python_distribution/ctypes/ctypes_python_pkg/ctypes_wrapper.py b/testprojects/src/python/python_distribution/ctypes/ctypes_python_pkg/ctypes_wrapper.py index a20bd54c10b3..c8b12a5ffd08 100644 --- a/testprojects/src/python/python_distribution/ctypes/ctypes_python_pkg/ctypes_wrapper.py +++ b/testprojects/src/python/python_distribution/ctypes/ctypes_python_pkg/ctypes_wrapper.py @@ -23,7 +23,6 @@ def get_generated_shared_lib(lib_name): asdf_c_lib = ctypes.CDLL(asdf_c_lib_path) asdf_cpp_lib = ctypes.CDLL(asdf_cpp_lib_path) - def f(x): added = asdf_c_lib.add_three(x) multiplied = asdf_cpp_lib.multiply_by_three(added) diff --git a/testprojects/src/python/python_distribution/fasthello_with_install_requires/hello_package/hello.py b/testprojects/src/python/python_distribution/fasthello_with_install_requires/hello_package/hello.py index 29dccd3905b8..43a6288ba017 100644 --- a/testprojects/src/python/python_distribution/fasthello_with_install_requires/hello_package/hello.py +++ b/testprojects/src/python/python_distribution/fasthello_with_install_requires/hello_package/hello.py @@ -8,7 +8,6 @@ import c_greet import cpp_greet - def hello(): print(c_greet.c_greet()) print(cpp_greet.cpp_greet())