From 19e54b091fd640d0b9a6b8bedcc02438017fd197 Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Sat, 6 Jan 2018 18:49:58 -0500 Subject: [PATCH] lint: Check doctest code too --- .flake8 | 1 + tornado/locks.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 -- 2.47.2