From 9d360f80cfe1cc0590736433a2e54c12dac4d190 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 20 Sep 2017 17:25:17 +0200 Subject: [PATCH] Use __attrs_post_init__ to validate ArgInfo This makes qutebrowser compatible with attrs < 17.1.0, such as attrs 16.3.0 coming with Debian Stretch. --- qutebrowser/commands/command.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/qutebrowser/commands/command.py b/qutebrowser/commands/command.py index 48db8380a..fd9b2382f 100644 --- a/qutebrowser/commands/command.py +++ b/qutebrowser/commands/command.py @@ -45,9 +45,7 @@ class ArgInfo: completion = attr.ib(None) choices = attr.ib(None) - @win_id.validator - @count.validator - def _validate_exclusive(self, _attr, _value): + def __attrs_post_init__(self): if self.win_id and self.count: raise TypeError("Argument marked as both count/win_id!")