diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 466cfa6e..f082fac9 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -11,19 +11,19 @@ replace = {new_version} search = version = "{current_version}" replace = version = "{new_version}" -[bumpversion:file:docs/examples.rst] +[bumpversion:file:docs/configuration.rst] search = {current_version} replace = {new_version} -[bumpversion:file:docs/quickstart.rst] +[bumpversion:file:docs/examples.rst] search = {current_version} replace = {new_version} -[bumpversion:file:docs/targets.rst] +[bumpversion:file:docs/quickstart.rst] search = {current_version} replace = {new_version} -[bumpversion:file:docs/tool_nitpick_section.rst] +[bumpversion:file:docs/targets.rst] search = {current_version} replace = {new_version} diff --git a/docs/tool_nitpick_section.rst b/docs/configuration.rst similarity index 51% rename from docs/tool_nitpick_section.rst rename to docs/configuration.rst index d2748bea..1da120e7 100644 --- a/docs/tool_nitpick_section.rst +++ b/docs/configuration.rst @@ -1,7 +1,7 @@ -.. _tool_nitpick: +.. _configuration: -The [tool.nitpick] section -========================== +Configuration +============= :ref:`the-style-file` for your project should be configured in the ``[tool.nitpick]`` section of your ``pyproject.toml`` file. @@ -31,6 +31,72 @@ You can also use the raw URL of a `GitHub Gist `_: [tool.nitpick] style = "https://gist.githubusercontent.com/andreoliwa/f4fccf4e3e83a3228e8422c01a48be61/raw/ff3447bddfc5a8665538ddf9c250734e7a38eabb/remote-style.toml" +Cache +----- + +Remote styles can be cached to avoid unnecessary HTTP requests. +The cache can be configured with the ``cache`` key; see the examples below. + +By default, remote styles will be cached for **one hour**. +This default will also be used if the ``cache`` key has an invalid value. + +Expiring after a predefined time +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The cache can be set to expire after a defined time unit. +Use the format ``cache = "