Skip to content
Myr

Allow name to be specified as the first parameter but with an explict name.

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

authored by Armin Ronacher · committed by Armin Ronacher · parent c9cd608 · Browse files · 2 files+5 added−1 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−1 removed

  • other:+5 added−1 removed

2 files+5 added−1 removed

modified:scripts/testproj/test.py+1 added
1 unmodified line
234mod = Module(__name__)5mod2 = Module(__name__, 'testmod2')6mod3 = Module(__name__, name='somemod', subdomain='meh')78app = Flask(__name__)9app.register_module(mod)10app.register_module(mod2)
26 unmodified lines
modified:scripts/flask-07-upgrade.py+4 added-1 removed
42 unmodified lines
43_url_for_re = re.compile(r'\b(url_for\()(%s)' % _string_re_part)44_render_template_re = re.compile(r'\b(render_template\()(%s)' % _string_re_part)45_after_request_re = re.compile(r'((?:@\S+\.(?:app_)?))(after_request)(\b\s*$)(?m)')46_module_constructor_re = re.compile(r'([a-zA-Z0-9_][a-zA-Z0-9_]*)\s*=\s*Module'47 r'\(__name__\s*(?:,\s*(%s))?' %47 r'\(__name__\s*(?:,\s*(?:name\s*=\s*)?(%s))?' %48 _string_re_part)49_error_handler_re = re.compile(r'%s\.error_handlers\[\s*(\d+)\s*\]' % _app_re_part)50_mod_route_re = re.compile(r'([a-zA-Z0-9_][a-zA-Z0-9_]*)\.route')51_blueprint_related = [
195 unmodified lines
247 make_diff(filename, contents, new_contents)248249250def walk_path(path):251 this_file = os.path.realpath(__file__).rstrip('c')252 for dirpath, dirnames, filenames in os.walk(path):253 dirnames[:] = [x for x in dirnames if not x.startswith('.')]254 for filename in filenames:255 filename = os.path.join(dirpath, filename)256 if os.path.realpath(filename) == this_file:257 continue258 if filename.endswith('.py'):259 yield filename, 'python'260 # skip files that are diffs. These might be false positives261 # when run multiple times.
70 unmodified lines