diff --git a/docs/config.rst b/docs/config.rst index de74aa2b..90a276cc 100644 --- a/docs/config.rst +++ b/docs/config.rst @@ -208,7 +208,7 @@ configuration:: class DevelopmentConfig(Config): DEBUG = True - class TestinConfig(Config): + class TestingConfig(Config): TESTING = True To enable such a config you just have to call into diff --git a/docs/errorhandling.rst b/docs/errorhandling.rst index c216c160..debb9d75 100644 --- a/docs/errorhandling.rst +++ b/docs/errorhandling.rst @@ -105,7 +105,7 @@ above, just make sure to use a lower setting (I would recommend if not app.debug: import logging - from themodule import TheHandler YouWant + from themodule import TheHandlerYouWant file_handler = TheHandlerYouWant(...) file_handler.setLevel(logging.WARNING) app.logger.addHandler(file_handler) diff --git a/docs/extensiondev.rst b/docs/extensiondev.rst index 1848ca8f..e468d8a1 100644 --- a/docs/extensiondev.rst +++ b/docs/extensiondev.rst @@ -288,12 +288,12 @@ extension to be approved you have to follow these guidelines: 1. An approved Flask extension must provide exactly one package or module inside the `flaskext` namespace package. -2. It must ship a testsuite that can either be invoked with ``make test`` - or ``python setup.py test``. For testsuites invoked with ``make +2. It must ship a testing suite that can either be invoked with ``make test`` + or ``python setup.py test``. For test suites invoked with ``make test`` the extension has to ensure that all dependencies for the test are installed automatically, in case of ``python setup.py test`` dependencies for tests alone can be specified in the `setup.py` - file. The testsuite also has to be part of the distribution. + file. The test suite also has to be part of the distribution. 3. APIs of approved extensions will be checked for the following characteristics: diff --git a/docs/security.rst b/docs/security.rst index a8a0afcf..35afd49e 100644 --- a/docs/security.rst +++ b/docs/security.rst @@ -110,7 +110,7 @@ stuff. Unfortunately that protection is only there for generate JSON. So what is the issue and how to avoid it? The problem are arrays at -toplevel in JSON. Imagine you send the following data out in a JSON +top-level in JSON. Imagine you send the following data out in a JSON request. Say that's exporting the names and email addresses of all your friends for a part of the user interface that is written in JavaScript. Not very uncommon: @@ -156,7 +156,7 @@ possible to patch constructors and register callbacks for setters. An attacker can use this (like above) to get all the data you exported in your JSON file. The browser will totally ignore the ``application/json`` mimetype if ``text/javascript`` is defined as content type in the script -tag and evaluate that as JavaScript. Because toplevel array elements are +tag and evaluate that as JavaScript. Because top-level array elements are allowed (albeit useless) and we hooked in our own constructor, after that page loaded the data from the JSON response is in the `captured` array. diff --git a/docs/styleguide.rst b/docs/styleguide.rst index 0fdc88d8..d46ecd04 100644 --- a/docs/styleguide.rst +++ b/docs/styleguide.rst @@ -91,7 +91,7 @@ General whitespace rules: value = my_list[ index ] value = my_dict ['key'] -Yoda statements are a nogo: +Yoda statements are a no-go: Never compare constant with variable, always variable with constant: Good::