From f5d4eb49890a3f1a013936efe1c113fd1716a095 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 4 Jun 2020 16:03:35 -0400 Subject: [PATCH] Appease black linter --- setup.py | 10 ++++++---- src/pluggy/callers/__init__.py | 2 +- testing/benchmark.py | 5 +---- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/setup.py b/setup.py index 6171755f..0d2cb014 100644 --- a/setup.py +++ b/setup.py @@ -38,24 +38,26 @@ class sdist(_sdist): """Custom sdist building using cython """ + def run(self): # Make sure the compiled Cython files in the distribution # are up-to-date from Cython.Build import cythonize + cythonize(["src/pluggy/callers/cythonized.pyx"]) _sdist.run(self) try: from Cython.Build import cythonize + print("Building Cython extension(s)") exts = cythonize(["src/pluggy/callers/cythonized.pyx"]) - cmdclass['sdist'] = sdist + cmdclass["sdist"] = sdist except ImportError: # When Cython is not installed build from C sources print("Building C extension(s)") - exts = [Extension("pluggy.callers.cythonized", - ["src/pluggy/callers/cythonized.c"])] + exts = [Extension("pluggy.callers.cythonized", ["src/pluggy/callers/cythonized.c"])] def main(): @@ -74,7 +76,7 @@ def main(): install_requires=['importlib-metadata>=0.12;python_version<"3.8"'], extras_require=EXTRAS_REQUIRE, classifiers=classifiers, - packages=['pluggy', 'pluggy.callers'], + packages=["pluggy", "pluggy.callers"], package_dir={"": "src"}, ext_modules=exts, cmdclass=cmdclass, diff --git a/src/pluggy/callers/__init__.py b/src/pluggy/callers/__init__.py index 2a3e030a..38695b27 100644 --- a/src/pluggy/callers/__init__.py +++ b/src/pluggy/callers/__init__.py @@ -6,7 +6,7 @@ from .._result import HookCallError, _Result, _raise_wrapfail from .cythonized import _c_multicall -__all__ = ['_multicall', '_c_multicall'] +__all__ = ["_multicall", "_c_multicall"] def _multicall(hook_impls, caller_kwargs, firstresult=False): diff --git a/testing/benchmark.py b/testing/benchmark.py index f98fbcca..fd048ac8 100644 --- a/testing/benchmark.py +++ b/testing/benchmark.py @@ -38,10 +38,7 @@ def wrappers(request): return [wrapper for i in range(request.param)] -@pytest.fixture( - params=[_multicall, _c_multicall], - ids=lambda item: item.__name__ -) +@pytest.fixture(params=[_multicall, _c_multicall], ids=lambda item: item.__name__) def callertype(request): return request.param