Skip to content

Commit

Permalink
Appease black linter
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Jun 5, 2020
1 parent b826f75 commit f5d4eb4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
10 changes: 6 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/pluggy/callers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
5 changes: 1 addition & 4 deletions testing/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit f5d4eb4

Please sign in to comment.