From: Ben Darnell Date: Sat, 6 Jan 2018 23:49:58 +0000 (-0500) Subject: lint: Check doctest code too X-Git-Tag: v5.0.0~19^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=19e54b091fd640d0b9a6b8bedcc02438017fd197;p=thirdparty%2Ftornado.git lint: Check doctest code too --- diff --git a/.flake8 b/.flake8 index 8d4ecfb02..1c2c768d1 100644 --- a/.flake8 +++ b/.flake8 @@ -10,3 +10,4 @@ ignore = E402, # E722 do not use bare except E722, +doctests = true diff --git a/tornado/locks.py b/tornado/locks.py index fd0ad6af7..3ab55a6d7 100644 --- a/tornado/locks.py +++ b/tornado/locks.py @@ -467,7 +467,7 @@ class Lock(object): ``async with`` includes both the ``yield`` and the ``acquire`` (just as it does with `threading.Lock`): - >>> async def f(): # doctest: +SKIP + >>> async def f2(): # doctest: +SKIP ... async with lock: ... # Do something holding the lock. ... pass