Skip to content

Commit 8f1dada

Browse files
committed
Some cleanups
1 parent 51d7c8d commit 8f1dada

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

flask/app.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,6 @@ def add_template_test(self, f, name=None):
11581158
"""
11591159
self.jinja_env.tests[name or f.__name__] = f
11601160

1161-
11621161
@setupmethod
11631162
def template_global(self, name=None):
11641163
"""A decorator that is used to register a custom template global function.
@@ -1710,7 +1709,7 @@ def do_teardown_request(self, exc=None):
17101709
if bp is not None and bp in self.teardown_request_funcs:
17111710
funcs = chain(funcs, reversed(self.teardown_request_funcs[bp]))
17121711
for func in funcs:
1713-
rv = func(exc)
1712+
func(exc)
17141713
request_tearing_down.send(self, exc=exc)
17151714

17161715
def do_teardown_appcontext(self, exc=None):

flask/debughelpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class newcls(oldcls):
7878
def __getitem__(self, key):
7979
try:
8080
return oldcls.__getitem__(self, key)
81-
except KeyError as e:
81+
except KeyError:
8282
if key not in request.form:
8383
raise
8484
raise DebugFilesKeyError(request, key)

flask/json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def get_current_user():
232232
"""
233233
indent = None
234234
if current_app.config['JSONIFY_PRETTYPRINT_REGULAR'] \
235-
and not request.is_xhr:
235+
and not request.is_xhr:
236236
indent = 2
237237
return current_app.response_class(dumps(dict(*args, **kwargs),
238238
indent=indent),

0 commit comments

Comments
 (0)