Merge branch 'master' of github.com:mitsuhiko/flask
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 · parents dbf55de, 0906f7d · Browse files · 4 files·+11 added−13 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+11 added−13 removed
- tests:+3 added−5 removed
- other:+8 added−8 removed
Provenance
- Commit
8e7d291- Tree
61d5adf- Author
Armin Ronacher <armin.ronacher@active-4.com>- Committer
Armin Ronacher <armin.ronacher@active-4.com>- Parent 1
dbf55de- Parent 2
0906f7d
4 files changed+11 added−13 removed
deleted:docs/_themesnot shown
Its text is not shown, deleted.
modified:docs/foreword.rst+2 added-2 removed
38 unmodified lines39 was implemented in Flask itself. There are currently extensions for40 object relational mappers, form validation, upload handling, various open41 authentication technologies and more.42 43-However Flask is not much code and built in a very solid foundation and44-with that very easy to adapt for large applications. If you are43+However Flask is not much code and it is built on a very solid foundation44+and with that it is very easy to adapt for large applications. If you are45 interested in that, check out the :ref:`becomingbig` chapter.46 47 If you are curious about the Flask design principles, head over to the48 section about :ref:`design`.61 unmodified linesmodified:docs/styleguide.rst+6 added-6 removed
29 unmodified lines30 MyModel.query.filter(MyModel.scalar > 120) \31 .order_by(MyModel.name.desc()) \32 .limit(10)33 34- If you break in a statement with parentheses or brances, align to the34+ If you break in a statement with parentheses or braces, align to the35 braces::36 37 this_is_a_very_long(function_call, 'with many parameters',38 23, 42, 'and even more')65 unmodified lines104 if 'md5' == method:105 pass106 107 Comparisons:108- - against arbitary types: ``==`` and ``!=``109- - against singletones with ``is`` and ``is not`` (eg: ``foo is not108+ - against arbitrary types: ``==`` and ``!=``109+ - against singletons with ``is`` and ``is not`` (eg: ``foo is not110 None``)111 - never compare something with `True` or `False` (for example never112 do ``foo == False``, do ``not foo`` instead)113 10 unmodified lines124 125 - Class names: ``CamelCase``, with acronyms kept uppercase (``HTTPWriter``126 and not ``HttpWriter``)127 - Variable names: ``lowercase_with_underscores``128-- Method and functin names: ``lowercase_with_underscores``128+- Method and function names: ``lowercase_with_underscores``129 - Constants: ``UPPERCASE_WITH_UNDERSCORES``130 - precompiled regular expressions: ``name_re``131 132 Protected members are prefixed with a single underscore. Double17 unmodified lines150 151 Docstring conventions:152 All docstrings are formatted with reStructuredText as understood by153 Sphinx. Depending on the number of lines in the docstring, they are154- layed out differently. If it's just one line, the closing tripple154+ layed out differently. If it's just one line, the closing triple155 quote is on the same line as the opening, otherwise the text is on156- the same line as the opening quote and the tripple quote that closes156+ the same line as the opening quote and the triple quote that closes157 the string on its own line::158 159 def foo():160 """This is a simple docstring"""40 unmodified linesmodified:tests/flaskext_test.py+3 added-5 removed
207 unmodified lines208 """209 210 211 def create_tox_ini(checkout_path, interpreters, flask_dep):212- tox_path = os.path.join(checkout_path, 'tox.ini')212+ tox_path = os.path.join(checkout_path, 'tox-flask-test.ini')213 if not os.path.exists(tox_path):214 with open(tox_path, 'w') as f:215 f.write(tox_template % {216 'env': ','.join(interpreters),217 'cache': tdir,218 'deps': flask_dep219 })220+ return tox_path221 222 223 def iter_extensions(only_approved=True):224 for ext in fetch_extensions_list():19 unmodified lines244 245 # if there is a tox.ini, remove it, it will cause troubles246 # for us. Remove it if present, we are running tox ourselves247 # afterall.247- toxini = os.path.join(checkout_path, 'tox.ini')248- if os.path.isfile(toxini):249- os.remove(toxini)248 249 create_tox_ini(checkout_path, interpreters, flask_dep)252- rv = subprocess.call(['tox'], cwd=checkout_path)250+ rv = subprocess.call(['tox', '-c', 'tox-flask-test.ini'], cwd=checkout_path)251 return TestResult(name, checkout_path, rv, interpreters)252 253 254 def run_tests(extensions, interpreters):57 unmodified lines