Remove some no-longer-necessary mypy workarounds
Made obsolete by python/mypy#1010
This commit is contained in:
parent
f4a306d74b
commit
55e7730c44
|
@ -335,7 +335,7 @@ class Template(object):
|
|||
# __name__ and __loader__ allow the traceback mechanism to find
|
||||
# the generated source code.
|
||||
"__name__": self.name.replace('.', '_'),
|
||||
"__loader__": ObjectDict(get_source=lambda name: self.code), # type: ignore
|
||||
"__loader__": ObjectDict(get_source=lambda name: self.code),
|
||||
}
|
||||
namespace.update(self.namespace)
|
||||
namespace.update(kwargs)
|
||||
|
|
|
@ -206,7 +206,7 @@ three{%end%}
|
|||
loader = DictLoader({
|
||||
"base.html": "{% module Template('sub.html') %}",
|
||||
"sub.html": "{{1/0}}",
|
||||
}, namespace={"_tt_modules": ObjectDict({"Template": lambda path, **kwargs: loader.load(path).generate(**kwargs)})})
|
||||
}, namespace={"_tt_modules": ObjectDict(Template=lambda path, **kwargs: loader.load(path).generate(**kwargs))})
|
||||
try:
|
||||
loader.load("base.html").generate()
|
||||
self.fail("did not get expected exception")
|
||||
|
|
|
@ -81,9 +81,9 @@ class CookieTestRequestHandler(RequestHandler):
|
|||
# don't call super.__init__
|
||||
self._cookies = {}
|
||||
if key_version is None:
|
||||
self.application = ObjectDict(settings=dict(cookie_secret=cookie_secret)) # type: ignore
|
||||
self.application = ObjectDict(settings=dict(cookie_secret=cookie_secret))
|
||||
else:
|
||||
self.application = ObjectDict(settings=dict(cookie_secret=cookie_secret, # type: ignore
|
||||
self.application = ObjectDict(settings=dict(cookie_secret=cookie_secret,
|
||||
key_version=key_version))
|
||||
|
||||
def get_cookie(self, name):
|
||||
|
|
Loading…
Reference in New Issue