forked from orbit-oss/flask
Typos.
This commit is contained in:
parent
4cd5201cdd
commit
0906f7d589
2 changed files with 6 additions and 7 deletions
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit 3d964b660442e23faedf801caed6e3c7bd42d5c9
|
|
||||||
|
|
@ -31,7 +31,7 @@ Continuing long statements:
|
||||||
.order_by(MyModel.name.desc()) \
|
.order_by(MyModel.name.desc()) \
|
||||||
.limit(10)
|
.limit(10)
|
||||||
|
|
||||||
If you break in a statement with parentheses or brances, align to the
|
If you break in a statement with parentheses or braces, align to the
|
||||||
braces::
|
braces::
|
||||||
|
|
||||||
this_is_a_very_long(function_call, 'with many parameters',
|
this_is_a_very_long(function_call, 'with many parameters',
|
||||||
|
|
@ -105,8 +105,8 @@ Yoda statements are a nogo:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
Comparisons:
|
Comparisons:
|
||||||
- against arbitary types: ``==`` and ``!=``
|
- against arbitrary types: ``==`` and ``!=``
|
||||||
- against singletones with ``is`` and ``is not`` (eg: ``foo is not
|
- against singletons with ``is`` and ``is not`` (eg: ``foo is not
|
||||||
None``)
|
None``)
|
||||||
- never compare something with `True` or `False` (for example never
|
- never compare something with `True` or `False` (for example never
|
||||||
do ``foo == False``, do ``not foo`` instead)
|
do ``foo == False``, do ``not foo`` instead)
|
||||||
|
|
@ -125,7 +125,7 @@ Naming Conventions
|
||||||
- Class names: ``CamelCase``, with acronyms kept uppercase (``HTTPWriter``
|
- Class names: ``CamelCase``, with acronyms kept uppercase (``HTTPWriter``
|
||||||
and not ``HttpWriter``)
|
and not ``HttpWriter``)
|
||||||
- Variable names: ``lowercase_with_underscores``
|
- Variable names: ``lowercase_with_underscores``
|
||||||
- Method and functin names: ``lowercase_with_underscores``
|
- Method and function names: ``lowercase_with_underscores``
|
||||||
- Constants: ``UPPERCASE_WITH_UNDERSCORES``
|
- Constants: ``UPPERCASE_WITH_UNDERSCORES``
|
||||||
- precompiled regular expressions: ``name_re``
|
- precompiled regular expressions: ``name_re``
|
||||||
|
|
||||||
|
|
@ -151,9 +151,9 @@ Docstrings
|
||||||
Docstring conventions:
|
Docstring conventions:
|
||||||
All docstrings are formatted with reStructuredText as understood by
|
All docstrings are formatted with reStructuredText as understood by
|
||||||
Sphinx. Depending on the number of lines in the docstring, they are
|
Sphinx. Depending on the number of lines in the docstring, they are
|
||||||
layed out differently. If it's just one line, the closing tripple
|
layed out differently. If it's just one line, the closing triple
|
||||||
quote is on the same line as the opening, otherwise the text is on
|
quote is on the same line as the opening, otherwise the text is on
|
||||||
the same line as the opening quote and the tripple quote that closes
|
the same line as the opening quote and the triple quote that closes
|
||||||
the string on its own line::
|
the string on its own line::
|
||||||
|
|
||||||
def foo():
|
def foo():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue