]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Remove useless lines, noused import and variable
authorfydot <ifidot@gmail.com>
Wed, 2 Sep 2015 17:46:42 +0000 (01:46 +0800)
committerBen Darnell <ben@bendarnell.com>
Sun, 6 Sep 2015 01:12:50 +0000 (21:12 -0400)
tornado/concurrent.py
tornado/gen.py
tornado/locale.py
tornado/testing.py
tornado/web.py

index f491bd09d6e95e3fdfb623aa4b2560661c5f163e..7a83b507964b9881140cb1181a13943b03911b7f 100644 (file)
@@ -373,6 +373,7 @@ def run_on_executor(*args, **kwargs):
     def run_on_executor_decorator(fn):
         executor = kwargs.get("executor", "executor")
         io_loop = kwargs.get("io_loop", "io_loop")
+
         @functools.wraps(fn)
         def wrapper(self, *args, **kwargs):
             callback = kwargs.pop("callback", None)
index 78ddce75c41c5e49e86524cbe694b685a4a69869..5c7dc019c52c1081e374cdafbc3ece8a2ba97922 100644 (file)
@@ -106,7 +106,8 @@ except ImportError:
 try:
     from inspect import isawaitable  # py35+
 except ImportError:
-    def isawaitable(x): return False
+    def isawaitable(x):
+        return False
 
 try:
     import builtins  # py3
@@ -222,6 +223,7 @@ def _make_coroutine_wrapper(func, replace_callback):
     # to be used with 'await'.
     if hasattr(types, 'coroutine'):
         func = types.coroutine(func)
+
     @functools.wraps(func)
     def wrapper(*args, **kwargs):
         future = TracebackFuture()
index a1f2b81be56c1c32df31cd1c11d455997c354784..8310c4d4c63de7a13a5236499f5c590c782cfccf 100644 (file)
@@ -61,6 +61,7 @@ _supported_locales = frozenset([_default_locale])
 _use_gettext = False
 CONTEXT_SEPARATOR = "\x04"
 
+
 def get(*locale_codes):
     """Returns the closest match for the given locale codes.
 
@@ -504,8 +505,8 @@ class GettextLocale(Locale):
         if plural_message is not None:
             assert count is not None
             msgs_with_ctxt = ("%s%s%s" % (context, CONTEXT_SEPARATOR, message),
-                          "%s%s%s" % (context, CONTEXT_SEPARATOR, plural_message),
-                          count)
+                              "%s%s%s" % (context, CONTEXT_SEPARATOR, plural_message),
+                              count)
             result = self.ngettext(*msgs_with_ctxt)
             if CONTEXT_SEPARATOR in result:
                 # Translation not found
index f3cfb77355d64f00cedd3455afd701bee6c43291..304f22db3fda25979f0de155d4cdcadc107efbed 100644 (file)
@@ -40,7 +40,6 @@ import re
 import signal
 import socket
 import sys
-import types
 
 try:
     from cStringIO import StringIO  # py2
index b6197ce7e90d1dcf41d7d722ed79032010571e76..dcdbb96385c14f54f444d877f40b75299bb58de9 100644 (file)
@@ -649,7 +649,6 @@ class RequestHandler(object):
             value = self.get_cookie(name)
         return get_signature_key_version(value)
 
-
     def redirect(self, url, permanent=False, status=None):
         """Sends a redirect to the given (optionally relative) URL.
 
@@ -2010,8 +2009,8 @@ class _RequestDispatcher(httputil.HTTPMessageDelegate):
         # except handler, and we cannot easily access the IOLoop here to
         # call add_future (because of the requirement to remain compatible
         # with WSGI)
-        f = self.handler._execute(transforms, *self.path_args,
-                                  **self.path_kwargs)
+        self.handler._execute(transforms, *self.path_args,
+                              **self.path_kwargs)
         # If we are streaming the request body, then execute() is finished
         # when the handler has prepared to receive the body.  If not,
         # it doesn't matter when execute() finishes (so we return None)