From fc0dbe15d5cff3e59a73e8a0b58a683b63cecc8a Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Sat, 15 Feb 2020 23:51:12 +0100 Subject: [PATCH] Fixing flake8 errors and warnings after rebasing --- cibuildwheel/__main__.py | 2 +- cibuildwheel/macos.py | 2 +- test/10_cpp_standards/cibuildwheel_test.py | 18 +++++++++--------- test/shared/utils.py | 2 ++ 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/cibuildwheel/__main__.py b/cibuildwheel/__main__.py index 27d50c76..1e5b249b 100644 --- a/cibuildwheel/__main__.py +++ b/cibuildwheel/__main__.py @@ -167,7 +167,7 @@ def main(): default_manylinux_images_i686 = {'manylinux1': 'quay.io/pypa/manylinux1_i686', 'manylinux2010': 'quay.io/pypa/manylinux2010_i686', 'manylinux2014': 'quay.io/pypa/manylinux2014_i686'} - default_manylinux_images_pypy_x86_64 = {'manylinux2010': 'pypywheels/manylinux2010-pypy_x86_64'} + default_manylinux_images_pypy_x86_64 = {'manylinux2010': 'pypywheels/manylinux2010-pypy_x86_64'} build_options.update( manylinux_images={'x86_64': default_manylinux_images_x86_64.get(manylinux_x86_64_image) or manylinux_x86_64_image, diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 9a2ebb41..2107e263 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -96,7 +96,7 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef if config.version[0] == '3': patch_file = os.path.abspath(os.path.join(os.path.dirname(__file__), 'resources', 'pypy3.6.patch')) sysconfigdata_file = os.path.join(os.path.dirname(installation_bin_path), 'lib_pypy', '_sysconfigdata.py') - subprocess.call(['patch', sysconfigdata_file, patch_file , '-N']) # Always has nonzero return code + subprocess.call(['patch', sysconfigdata_file, patch_file, '-N']) # Always has nonzero return code else: raise ValueError("Unknown Python implementation") diff --git a/test/10_cpp_standards/cibuildwheel_test.py b/test/10_cpp_standards/cibuildwheel_test.py index e9725f03..cf838800 100644 --- a/test/10_cpp_standards/cibuildwheel_test.py +++ b/test/10_cpp_standards/cibuildwheel_test.py @@ -18,8 +18,8 @@ def test_cpp11(tmp_path): actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env) expected_wheels = [w for w in utils.expected_wheels( 'spam', '0.1.0', macosx_deployment_target='10.9') - if 'cp27-cp27m-win' not in w and - 'pp27-pypy_73-win32' not in w] + if 'cp27-cp27m-win' not in w + and 'pp27-pypy_73-win32' not in w] assert set(actual_wheels) == set(expected_wheels) @@ -36,9 +36,9 @@ def test_cpp14(): actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env) expected_wheels = [w for w in utils.expected_wheels( 'spam', '0.1.0', macosx_deployment_target='10.9') - if 'cp27-cp27m-win' not in w and - 'pp27-pypy_73-win32' not in w and - 'cp35-cp35m-win' not in w] + if 'cp27-cp27m-win' not in w + and 'pp27-pypy_73-win32' not in w + and 'cp35-cp35m-win' not in w] assert set(actual_wheels) == set(expected_wheels) @@ -58,8 +58,8 @@ def test_cpp17(): actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env) expected_wheels = [w for w in utils.expected_wheels( 'spam', '0.1.0', macosx_deployment_target='10.13') - if 'cp27-cp27m-win' not in w and - 'pp27-pypy_73-win32' not in w and - 'cp35-cp35m-win' not in w and - 'pp36-pypy36_pp73-win32' not in w] + if 'cp27-cp27m-win' not in w + and 'pp27-pypy_73-win32' not in w + and 'cp35-cp35m-win' not in w + and 'pp36-pypy36_pp73-win32' not in w] assert set(actual_wheels) == set(expected_wheels) diff --git a/test/shared/utils.py b/test/shared/utils.py index 3f7f0d03..d0db8b1f 100644 --- a/test/shared/utils.py +++ b/test/shared/utils.py @@ -92,10 +92,12 @@ def expected_wheels(package_name, package_version, manylinux_versions=['manylinu for architecture in architectures[python_implemention] for manylinux_version in manylinux_versions ] + def get_platform_tags(python_abi_tag): return platform_tags[python_abi_tag[:2]] elif platform == 'windows': platform_tags = {'cp': ['win32', 'win_amd64'], 'pp': ['win32']} + def get_platform_tags(python_abi_tag): return platform_tags[python_abi_tag[:2]]