From 4202dcbce05556ab19b7ebd18067d942e990ec5b Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Wed, 24 Oct 2018 12:13:44 +0200 Subject: [PATCH] Unpin pytest, pacify new flake8 --- setup.py | 6 ++++-- src/attr/validators.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index e6ea4b55d..8ec447a38 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ "coverage", "hypothesis", "pympler", - "pytest<3.9", + "pytest", "six", "zope.interface", ], @@ -87,7 +87,9 @@ def find_meta(meta): + "Release Information\n" + "===================\n\n" + re.search( - "(\d+.\d.\d \(.*?\)\n.*?)\n\n\n----\n\n\n", read("CHANGELOG.rst"), re.S + r"(\d+.\d.\d \(.*?\)\n.*?)\n\n\n----\n\n\n", + read("CHANGELOG.rst"), + re.S, ).group(1) + "\n\n`Full changelog " + "<{url}en/stable/changelog.html>`_.\n\n".format(url=URL) diff --git a/src/attr/validators.py b/src/attr/validators.py index f12d0aa59..a62e03eba 100644 --- a/src/attr/validators.py +++ b/src/attr/validators.py @@ -136,7 +136,7 @@ class _InValidator(object): def __call__(self, inst, attr, value): try: in_options = value in self.options - except TypeError as e: # e.g. `1 in "abc"` + except TypeError: # e.g. `1 in "abc"` in_options = False if not in_options: