Fix typos/grammar in docs (#2201)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Static · committed by Adrian · parent 06112a5 · Browse files · 6 files·+8 added−8 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+8 added−8 removed
- other:+8 added−8 removed
Provenance
- Commit
f5adb61- Tree
8124dfe- Author
Static <staticfox@staticfox.net>- Committer
Adrian <adrian@planetcoding.net>- Parent
06112a5
6 files changed+8 added−8 removed
modified:docs/patterns/fileuploads.rst+1 added-1 removed
56 unmodified lines57 flash('No file part')58 return redirect(request.url)59 file = request.files['file']60 # if user does not select file, browser also61- # submit a empty part without filename61+ # submit an empty part without filename62 if file.filename == '':63 flash('No selected file')64 return redirect(request.url)65 if file and allowed_file(file.filename):119 unmodified linesmodified:docs/conf.py+1 added-1 removed
232 unmodified lines233 234 # The scheme of the identifier. Typical schemes are ISBN or URL.235 #epub_scheme = ''236 237-# The unique identifier of the text. This can be a ISBN number237+# The unique identifier of the text. This can be an ISBN number238 # or the project homepage.239 #epub_identifier = ''240 241 # A unique identification for the text.61 unmodified linesmodified:docs/styleguide.rst+1 added-1 removed
165 unmodified lines166 is on its own line.167 """168 169 Module header:170- The module header consists of an utf-8 encoding declaration (if non170+ The module header consists of a utf-8 encoding declaration (if non171 ASCII letters are used, but it is recommended all the time) and a172 standard docstring::173 174 # -*- coding: utf-8 -*-26 unmodified linesmodified:docs/upgrading.rst+2 added-2 removed
47 unmodified lines48 # ETag still needs to be manually set49 response = send_file(open(fname), attachment_filename=fname)50 response.set_etag(...)51 52-The reason for this is that some file-like objects have a invalid or even52+The reason for this is that some file-like objects have an invalid or even53 misleading ``name`` attribute. Silently swallowing errors in such cases was not54 a satisfying solution.55 56 Additionally the default of falling back to ``application/octet-stream`` has140 unmodified lines197 applications with Flask. Because we want to make upgrading as easy as198 possible we tried to counter the problems arising from these changes by199 providing a script that can ease the transition.200 201-The script scans your whole application and generates an unified diff with201+The script scans your whole application and generates a unified diff with202 changes it assumes are safe to apply. However as this is an automated203 tool it won't be able to find all use cases and it might miss some. We204 internally spread a lot of deprecation warnings all over the place to make205 it easy to find pieces of code that it was unable to upgrade.267 unmodified linesmodified:flask/app.py+2 added-2 removed
389 unmodified lines390 #: special key ``None`` points to a list of tuples where the first item391 #: is the class for the instance check and the second the error handler392 #: function.393 #:394- #: To register a error handler, use the :meth:`errorhandler`394+ #: To register an error handler, use the :meth:`errorhandler`395 #: decorator.396 self.error_handler_spec = {None: self._error_handlers}397 398 #: A list of functions that are called when :meth:`url_for` raises a954 unmodified lines1353 that they will fail. If they do execute code that might fail they1354 will have to surround the execution of these code by try/except1355 statements and log occurring errors.1356 1357- When a teardown function was called because of a exception it will1357+ When a teardown function was called because of an exception it will1358 be passed an error object.1359 1360 The return values of teardown functions are ignored.1361 646 unmodified linesmodified:scripts/flask-07-upgrade.py+1 added-1 removed
3 unmodified lines4 flask-07-upgrade5 ~~~~~~~~~~~~~~~~6 7 This command line script scans a whole application tree and attempts to8- output an unified diff with all the changes that are necessary to easily8+ output a unified diff with all the changes that are necessary to easily9 upgrade the application to 0.7 and to not yield deprecation warnings.10 11 This will also attempt to find `after_request` functions that don't modify12 the response and appear to be better suited for `teardown_request`.286 unmodified lines