Browse Source

Fix typos/grammar in docs (#2201)

pull/2164/merge
Static 8 years ago committed by Adrian
parent
commit
f5adb61b28
  1. 2
      docs/conf.py
  2. 2
      docs/patterns/fileuploads.rst
  3. 2
      docs/styleguide.rst
  4. 4
      docs/upgrading.rst
  5. 4
      flask/app.py
  6. 2
      scripts/flask-07-upgrade.py

2
docs/conf.py

@ -234,7 +234,7 @@ latex_additional_files = ['flaskstyle.sty', 'logo.pdf']
# The scheme of the identifier. Typical schemes are ISBN or URL. # The scheme of the identifier. Typical schemes are ISBN or URL.
#epub_scheme = '' #epub_scheme = ''
# The unique identifier of the text. This can be a ISBN number # The unique identifier of the text. This can be an ISBN number
# or the project homepage. # or the project homepage.
#epub_identifier = '' #epub_identifier = ''

2
docs/patterns/fileuploads.rst

@ -58,7 +58,7 @@ the file and redirects the user to the URL for the uploaded file::
return redirect(request.url) return redirect(request.url)
file = request.files['file'] file = request.files['file']
# if user does not select file, browser also # if user does not select file, browser also
# submit a empty part without filename # submit an empty part without filename
if file.filename == '': if file.filename == '':
flash('No selected file') flash('No selected file')
return redirect(request.url) return redirect(request.url)

2
docs/styleguide.rst

@ -167,7 +167,7 @@ Docstring conventions:
""" """
Module header: Module header:
The module header consists of an utf-8 encoding declaration (if non The module header consists of a utf-8 encoding declaration (if non
ASCII letters are used, but it is recommended all the time) and a ASCII letters are used, but it is recommended all the time) and a
standard docstring:: standard docstring::

4
docs/upgrading.rst

@ -49,7 +49,7 @@ Any of the following is functionally equivalent::
response = send_file(open(fname), attachment_filename=fname) response = send_file(open(fname), attachment_filename=fname)
response.set_etag(...) response.set_etag(...)
The reason for this is that some file-like objects have a invalid or even The reason for this is that some file-like objects have an invalid or even
misleading ``name`` attribute. Silently swallowing errors in such cases was not misleading ``name`` attribute. Silently swallowing errors in such cases was not
a satisfying solution. a satisfying solution.
@ -198,7 +198,7 @@ applications with Flask. Because we want to make upgrading as easy as
possible we tried to counter the problems arising from these changes by possible we tried to counter the problems arising from these changes by
providing a script that can ease the transition. providing a script that can ease the transition.
The script scans your whole application and generates an unified diff with The script scans your whole application and generates a unified diff with
changes it assumes are safe to apply. However as this is an automated changes it assumes are safe to apply. However as this is an automated
tool it won't be able to find all use cases and it might miss some. We tool it won't be able to find all use cases and it might miss some. We
internally spread a lot of deprecation warnings all over the place to make internally spread a lot of deprecation warnings all over the place to make

4
flask/app.py

@ -391,7 +391,7 @@ class Flask(_PackageBoundObject):
#: is the class for the instance check and the second the error handler #: is the class for the instance check and the second the error handler
#: function. #: function.
#: #:
#: To register a error handler, use the :meth:`errorhandler` #: To register an error handler, use the :meth:`errorhandler`
#: decorator. #: decorator.
self.error_handler_spec = {None: self._error_handlers} self.error_handler_spec = {None: self._error_handlers}
@ -1354,7 +1354,7 @@ class Flask(_PackageBoundObject):
will have to surround the execution of these code by try/except will have to surround the execution of these code by try/except
statements and log occurring errors. statements and log occurring errors.
When a teardown function was called because of a exception it will When a teardown function was called because of an exception it will
be passed an error object. be passed an error object.
The return values of teardown functions are ignored. The return values of teardown functions are ignored.

2
scripts/flask-07-upgrade.py

@ -5,7 +5,7 @@
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
This command line script scans a whole application tree and attempts to This command line script scans a whole application tree and attempts to
output an unified diff with all the changes that are necessary to easily output a unified diff with all the changes that are necessary to easily
upgrade the application to 0.7 and to not yield deprecation warnings. upgrade the application to 0.7 and to not yield deprecation warnings.
This will also attempt to find `after_request` functions that don't modify This will also attempt to find `after_request` functions that don't modify

Loading…
Cancel
Save