diff --git a/README.rst b/README.rst index 6d30ac96..61cbd01e 100644 --- a/README.rst +++ b/README.rst @@ -350,6 +350,13 @@ Or install it with pip:: Run ~~~ +Nitpick_ will fail if no style is explicitly configured. +Run this command to download and use the opinionated :gitref:`default style file `: + + nitpick init + +You can use it as a template to :ref:`configure-your-own-style`. + To fix and modify your files directly:: nitpick fix @@ -358,15 +365,10 @@ To check for errors only:: nitpick check -Nitpick is also a ``flake8`` plugin, so you can run this on a project -with at least one Python (``.py``) file:: +Nitpick is also a flake8_ plugin, so you can run this on a project with at least one Python (``.py``) file:: flake8 . -Nitpick will download and use the opinionated `default style file `_. - -You can use it as a template to configure your own style. - Run as a pre-commit hook ~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/configuration.rst b/docs/configuration.rst index 4f39c681..ce2d29f2 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -18,7 +18,9 @@ Possible configuration files (in order of precedence): The first file found will be used; the other files will be ignored. -Run the ``nipick init`` CLI command to create a config file (:ref:`cli_cmd_init`). +If no style is configured, Nitpick will fail with an error message. + +Run ``nipick init`` to create a config file (:ref:`cli_cmd_init`). To configure your own style, you can either use ``nitpick init``: @@ -217,7 +219,7 @@ Multiple styles You can also use multiple styles and mix local files and URLs. -Example of usage: the ``[tool.nitpick]`` table on :gitref:`Nitpick's own pyproject.toml `. +Example of usage: the ``[tool.nitpick]`` table on :gitref:`Nitpick's own pyproject.toml `. .. code-block:: toml diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 14907c33..cce7e2ce 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -36,6 +36,13 @@ Or install it with pip:: Run --- +Nitpick_ will fail if no style is explicitly configured. +Run this command to download and use the opinionated :gitref:`default style file `: + + nitpick init + +You can use it as a template to :ref:`configure-your-own-style`. + To fix and modify your files directly:: nitpick fix @@ -48,10 +55,6 @@ Nitpick is also a flake8_ plugin, so you can run this on a project with at least flake8 . -Nitpick_ will download and use the opinionated :gitref:`default style file `. - -You can use it as a template to :ref:`configure-your-own-style`. - Run as a pre-commit hook ------------------------