Skip to content
Myr

python-modernize automated changes: fix_dict

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Thomas Waldmann · committed by Thomas Waldmann · parent cfbfff2 · Browse files · 2 files+5 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+5 added−3 removed

  • other:+5 added−3 removed

2 files+5 added−3 removed

modified:flask/sessions.py+2 added-1 removed
15 unmodified lines
16from werkzeug.datastructures import CallbackDict17from . import Markup, json1819from itsdangerous import URLSafeTimedSerializer, BadSignature20import six212223def total_seconds(td):24 return td.days * 60 * 60 * 24 + td.seconds
43 unmodified lines
68 return [_tag(x) for x in value]69 elif isinstance(value, datetime):70 return {' d': http_date(value)}71 elif isinstance(value, dict):71 return dict((k, _tag(v)) for k, v in value.iteritems())72 return dict((k, _tag(v)) for k, v in six.iteritems(value))73 elif isinstance(value, str):74 try:75 return unicode(value)76 except UnicodeError:
251 unmodified lines
modified:flask/templating.py+3 added-2 removed
13 unmodified lines
1415from .globals import _request_ctx_stack, _app_ctx_stack16from .signals import template_rendered17from .module import blueprint_is_module18import six192021def _default_template_ctx_processor():22 """Default template context processor. Injects `request`,
56 unmodified lines
79 yield loader, local_name80 except (ValueError, KeyError):81 pass8282 for blueprint in self.app.blueprints.itervalues():83 for blueprint in six.itervalues(self.app.blueprints):84 if blueprint_is_module(blueprint):85 continue86 loader = blueprint.jinja_loader87 if loader is not None:
4 unmodified lines
92 loader = self.app.jinja_loader93 if loader is not None:94 result.update(loader.list_templates())9595 for name, blueprint in self.app.blueprints.iteritems():96 for name, blueprint in six.iteritems(self.app.blueprints):97 loader = blueprint.jinja_loader98 if loader is not None:99 for template in loader.list_templates():100 prefix = ''
43 unmodified lines