From: Pierce Lopez Date: Sun, 31 Dec 2017 18:54:07 +0000 (-0500) Subject: style fix: 3 blank lines is too many, 0 is too few X-Git-Tag: v5.0.0~20^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a358a660fbd37e4ffa6b14027d5e79d8dd16337f;p=thirdparty%2Ftornado.git style fix: 3 blank lines is too many, 0 is too few around functions and classes E306 expected 1 blank line before a nested definition, found 0 E303 too many blank lines (3) --- diff --git a/maint/circlerefs/circlerefs.py b/maint/circlerefs/circlerefs.py index fe91a09b4..5cc4e1f6d 100644 --- a/maint/circlerefs/circlerefs.py +++ b/maint/circlerefs/circlerefs.py @@ -76,7 +76,6 @@ class DummyAsyncHandler(web.RequestHandler): raise web.Finish('ok\n') - application = web.Application([ (r'/dummy/', DummyHandler), (r'/dummyasync/', DummyAsyncHandler), diff --git a/maint/test/redbot/red_test.py b/maint/test/redbot/red_test.py index e0c6459f0..f47334907 100644 --- a/maint/test/redbot/red_test.py +++ b/maint/test/redbot/red_test.py @@ -109,10 +109,12 @@ class TestMixin(object): def run_redbot(self, url, method, body, headers): red = HttpResource(url, method=method, req_body=body, req_hdrs=headers) + def work(): red.run(thor.stop) thor.run() self.io_loop.add_callback(self.stop) + thread = threading.Thread(target=work) thread.start() self.wait() diff --git a/tornado/test/concurrent_test.py b/tornado/test/concurrent_test.py index 955f410a3..bbefb1c61 100644 --- a/tornado/test/concurrent_test.py +++ b/tornado/test/concurrent_test.py @@ -201,6 +201,7 @@ class ReturnFutureTest(AsyncTestCase): app_log.error('%s: %s', context['message'], type(context.get('exception'))) self.io_loop.asyncio_loop.set_exception_handler(exc_handler) + @gen.coroutine def f(): yield gen.moment diff --git a/tornado/test/gen_test.py b/tornado/test/gen_test.py index 199316c7c..476035d0b 100644 --- a/tornado/test/gen_test.py +++ b/tornado/test/gen_test.py @@ -1326,7 +1326,6 @@ class WithTimeoutTest(AsyncTestCase): executor.submit(lambda: time.sleep(0.01))) - class WaitIteratorTest(AsyncTestCase): @gen_test def test_empty_iterator(self):