Skip to content
This repository
Browse code

Merge branch 'master' of github.com:mitsuhiko/flask

  • Loading branch information...
commit 81b4271fa67f160dfde210ed011c219f4b065594 2 parents 2b8ea40 + 90884a7
Armin Ronacher authored

Showing 3 changed files with 13 additions and 14 deletions. Show diff stats Hide diff stats

  1. +5 3 flask/app.py
  2. +1 1  flask/views.py
  3. +7 10 setup.py
8 flask/app.py
@@ -657,7 +657,7 @@ def update_template_context(self, context):
657 657 # existing views.
658 658 context.update(orig_ctx)
659 659
660   - def run(self, host='127.0.0.1', port=5000, **options):
  660 + def run(self, host='127.0.0.1', port=5000, debug=None, **options):
661 661 """Runs the application on a local development server. If the
662 662 :attr:`debug` flag is set the server will automatically reload
663 663 for code changes and show a debugger in case an exception happened.
@@ -680,14 +680,16 @@ def run(self, host='127.0.0.1', port=5000, **options):
680 680 :param host: the hostname to listen on. set this to ``'0.0.0.0'``
681 681 to have the server available externally as well.
682 682 :param port: the port of the webserver
  683 + :param debug: if given, enable or disable debug mode.
  684 + See :attr:`debug`.
683 685 :param options: the options to be forwarded to the underlying
684 686 Werkzeug server. See
685 687 :func:`werkzeug.serving.run_simple` for more
686 688 information.
687 689 """
688 690 from werkzeug.serving import run_simple
689   - if 'debug' in options:
690   - self.debug = options.pop('debug')
  691 + if debug is not None:
  692 + self.debug = bool(debug)
691 693 options.setdefault('use_reloader', self.debug)
692 694 options.setdefault('use_debugger', self.debug)
693 695 try:
2  flask/views.py
@@ -64,7 +64,7 @@ def dispatch_request(self):
64 64
65 65 def dispatch_request(self):
66 66 """Subclasses have to override this method to implement the
67   - actual view functionc ode. This method is called with all
  67 + actual view function code. This method is called with all
68 68 the arguments from the URL rule.
69 69 """
70 70 raise NotImplementedError()
17 setup.py
@@ -49,7 +49,7 @@ class run_audit(Command):
49 49 user_options = []
50 50
51 51 def initialize_options(self):
52   - all = None
  52 + pass
53 53
54 54 def finalize_options(self):
55 55 pass
@@ -62,22 +62,19 @@ def run(self):
62 62 print "Audit requires PyFlakes installed in your system."""
63 63 sys.exit(-1)
64 64
65   - dirs = ['flask', 'tests']
66   - # Add example directories
67   - for dir in ['flaskr', 'jqueryexample', 'minitwit']:
68   - dirs.append(os.path.join('examples', dir))
69   - # TODO: Add test subdirectories
70 65 warns = 0
  66 + # Define top-level directories
  67 + dirs = ('flask', 'examples', 'scripts')
71 68 for dir in dirs:
72   - for filename in os.listdir(dir):
73   - if filename.endswith('.py') and filename != '__init__.py':
74   - warns += flakes.checkPath(os.path.join(dir, filename))
  69 + for root, _, files in os.walk(dir):
  70 + for file in files:
  71 + if file != '__init__.py' and file.endswith('.py') :
  72 + warns += flakes.checkPath(os.path.join(root, file))
75 73 if warns > 0:
76 74 print ("Audit finished with total %d warnings." % warns)
77 75 else:
78 76 print ("No problems found in sourcecode.")
79 77
80   -
81 78 setup(
82 79 name='Flask',
83 80 version='0.8-dev',

0 comments on commit 81b4271

Please sign in to comment.
Something went wrong with that request. Please try again.