chore: add black for all code, no string norm

This commit is contained in:
Henry Schreiner
2021-05-03 13:12:36 -04:00
committed by Henry Schreiner
parent 5716296071
commit 9cbed6a9be
12 changed files with 39 additions and 32 deletions
+6 -4
View File
@@ -8,7 +8,7 @@ from .test_projects import TestProject
cpp_test_project = TestProject()
cpp_test_project.files['setup.py'] = jinja2.Template(r'''
setup_py_template = r'''\
from setuptools import Extension, setup
setup(
@@ -16,9 +16,9 @@ setup(
ext_modules=[Extension('spam', sources=['spam.cpp'], language="c++", extra_compile_args={{ extra_compile_args }})],
version="0.1.0",
)
''')
'''
cpp_test_project.files['spam.cpp'] = jinja2.Template(r'''
spam_cpp_template = r'''\
#include <Python.h>
{{ spam_cpp_top_level_add }}
@@ -69,8 +69,10 @@ MOD_INIT(spam)
MOD_RETURN(m)
}
''')
'''
cpp_test_project.files['setup.py'] = jinja2.Template(setup_py_template)
cpp_test_project.files['spam.cpp'] = jinja2.Template(spam_cpp_template)
cpp11_project = cpp_test_project.copy()
cpp11_project.template_context['extra_compile_args'] = (
+2 -2
View File
@@ -54,11 +54,11 @@ def test_pinned_versions(tmp_path, python_version):
if utils.platform == 'windows' and python_version == '2.7':
pytest.skip('Windows requires a workaround')
is_running_on_macos_11_or_later = (
is_macos_11_or_later = (
utils.platform == 'macos' and utils.get_macos_version() >= (10, 16)
)
if is_running_on_macos_11_or_later and python_version == '3.5':
if is_macos_11_or_later and python_version == '3.5':
pytest.skip('CPython 3.5 doesn\'t work on macOS Big Sur+')
project_dir = tmp_path / 'project'
+4 -4
View File
@@ -8,10 +8,10 @@ from . import test_projects, utils
basic_project = test_projects.new_c_project()
ALL_MACOS_WHEELS = (
utils.expected_wheels('spam', '0.1.0', machine_arch='x86_64')
+ utils.expected_wheels('spam', '0.1.0', machine_arch='arm64')
)
ALL_MACOS_WHEELS = {
*utils.expected_wheels('spam', '0.1.0', machine_arch='x86_64'),
*utils.expected_wheels('spam', '0.1.0', machine_arch='arm64')
}
def get_xcode_version() -> Tuple[int, int]:
+2 -1
View File
@@ -64,7 +64,8 @@ def test(manylinux_image, tmp_path):
add_env['CIBW_SKIP'] = 'pp*'
elif manylinux_image in {'manylinux2014', 'manylinux_2_24'}:
# We don't have a manylinux2014 / 'manylinux_2_24' image for PyPy (yet?)
add_env['CIBW_SKIP'] = 'cp27* pp*' # Python 2.7 not available on manylinux2014 / 'manylinux_2_24'
# Python 2.7 not available on manylinux2014 / 'manylinux_2_24'
add_env['CIBW_SKIP'] = 'cp27* pp*'
actual_wheels = utils.cibuildwheel_run(project_dir, add_env=add_env)
expected_wheels = [w for w in utils.expected_wheels('spam', '0.1.0', manylinux_versions=[manylinux_image])]