Skip to content

Commit

Permalink
now works if no interfaces have been added
Browse files Browse the repository at this point in the history
  • Loading branch information
soldni committed Sep 5, 2022
1 parent e8df545 commit d716c0b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "trouting"
version = "0.2.1"
version = "0.2.2"
description = "Trouting (short for Type Routing) is a simple class decorator that allows to define multiple interfaces for a method that behave differently depending on input types."
authors = [
{name = "Luca Soldaini", email = "[email protected]" }
Expand Down
2 changes: 1 addition & 1 deletion src/trouting/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def add_interface(
interface_specs = self._expand_interface_combinations(kwargs)
current_interface_args = tuple(interface_specs[0].keys())

if not hasattr(self, "bounded_args"):
if self.bounded_args is None:
self.bounded_args = current_interface_args
elif self.bounded_args != current_interface_args:
raise ValueError(
Expand Down

0 comments on commit d716c0b

Please sign in to comment.