From 65e9ddfb9d1a56c168bdc13defe1fe74333f482f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Alvergnat?= Date: Fri, 1 May 2020 23:22:17 +0200 Subject: [PATCH] Fix errors when regex module is available (thx @singron) Close #20 Co-authored-by: singron --- .travis.yml | 5 +++++ rebulk/loose.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6a34b03..11fc63d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,9 +13,14 @@ matrix: - python: 3.8-dev dist: xenial sudo: true +env: + matrix: + - PYTHON_REGEX=false + - PYTHON_REGEX=true install: - pip install pip --upgrade - pip install -e .[dev,test] + - if [[ "$PYTHON_REGEX" == "true" ]]; then pip install regex; fi; - pip install coveralls script: - coverage run --source=rebulk setup.py test diff --git a/rebulk/loose.py b/rebulk/loose.py index 5e747a8..423b4ea 100644 --- a/rebulk/loose.py +++ b/rebulk/loose.py @@ -56,7 +56,7 @@ def call(function, *args, **kwargs): :rtype: object """ func = constructor_args if isclass(function) else function_args - call_args, call_kwargs = func(function, *args, **kwargs) + call_args, call_kwargs = func(function, *args, ignore_unused=True, **kwargs) # @see #20 return function(*call_args, **call_kwargs)