File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 25
25
class FlaskCompatibilityWarning (DeprecationWarning ):
26
26
pass
27
27
28
+
28
29
def merge (first , second ):
29
30
"""
30
31
Recursively merges two dictionaries.
@@ -135,6 +136,7 @@ def import_check_view_func():
135
136
actual method body remaining the same in each flask version.
136
137
"""
137
138
import importlib .metadata
139
+
138
140
flask_version = importlib .metadata .version ("flask" ).split ("." )
139
141
140
142
def local_endpoint_from_view_func (view_func : typing .Callable ) -> str :
@@ -143,6 +145,7 @@ def local_endpoint_from_view_func(view_func: typing.Callable) -> str:
143
145
"""
144
146
assert view_func is not None , "expected view func if endpoint is not provided."
145
147
return view_func .__name__
148
+
146
149
try :
147
150
if flask_version [0 ] == "1" :
148
151
from flask .helpers import _endpoint_from_view_func
@@ -159,4 +162,3 @@ def local_endpoint_from_view_func(view_func: typing.Callable) -> str:
159
162
if _endpoint_from_view_func is None :
160
163
_endpoint_from_view_func = local_endpoint_from_view_func
161
164
return _endpoint_from_view_func
162
-
You can’t perform that action at this time.
0 commit comments