Skip to content
Myr

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

4 files+11 added−13 removed

deleted:docs/_themesnot shown

Its text is not shown, deleted.

modified:docs/foreword.rst+2 added-2 removed
38 unmodified lines
39was implemented in Flask itself. There are currently extensions for40object relational mappers, form validation, upload handling, various open41authentication technologies and more.4243However Flask is not much code and built in a very solid foundation and44with that very easy to adapt for large applications. If you are43However Flask is not much code and it is built on a very solid foundation44and with that it is very easy to adapt for large applications. If you are45interested in that, check out the :ref:`becomingbig` chapter.4647If you are curious about the Flask design principles, head over to the48section about :ref:`design`.
61 unmodified lines
modified:docs/styleguide.rst+6 added-6 removed
29 unmodified lines
30 MyModel.query.filter(MyModel.scalar > 120) \31 .order_by(MyModel.name.desc()) \32 .limit(10)3334 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::3637 this_is_a_very_long(function_call, 'with many parameters',38 23, 42, 'and even more')
65 unmodified lines
104 if 'md5' == method:105 pass106107Comparisons: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 lines
124125- 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``131132Protected members are prefixed with a single underscore. Double
17 unmodified lines
150151Docstring 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::158159 def foo():160 """This is a simple docstring"""
40 unmodified lines
modified:tests/flaskext_test.py+3 added-5 removed
207 unmodified lines
208"""209210211def 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_path221222223def iter_extensions(only_approved=True):224 for ext in fetch_extensions_list():
19 unmodified lines
244245 # 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)248249 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)252253254def run_tests(extensions, interpreters):
57 unmodified lines