From cf7b0757dc1fb69542178207c3902f75344c986a Mon Sep 17 00:00:00 2001 From: Jakub Stasiak Date: Mon, 9 Dec 2019 23:56:33 +0100 Subject: [PATCH] Fix UnsatisfiedRequirement rendering The issue helpfully described and solution suggested by eugenhu. UnsatisfiedRequirement's __str__ depends on there being two arguments (the first one optionally None). Closes GH-129. --- injector/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/injector/__init__.py b/injector/__init__.py index 514a237..ffad592 100644 --- a/injector/__init__.py +++ b/injector/__init__.py @@ -590,7 +590,7 @@ class Binder: self._bindings[interface] = binding return binding, self - raise UnsatisfiedRequirement(interface) + raise UnsatisfiedRequirement(None, interface) def _is_special_interface(self, interface): # "Special" interfaces are ones that you cannot bind yourself but