Move Configuration.get_value to earlier section

This commit is contained in:
Pradyun Gedam 2020-03-26 16:17:09 +05:30
parent cb7b3af06f
commit ba81cc9bd0
No known key found for this signature in database
GPG Key ID: DA17C4B29CB32E4B
1 changed files with 8 additions and 8 deletions

View File

@ -81,6 +81,14 @@ and the methods used would be:
Provides key-value pairs (like ``dict.items()``) from the loaded-in-memory
information, handling all of the override ordering logic.
.. py:method:: get_value(key)
Provides the value of the given key from the loaded configuration.
The loaded configuration may have ``load_only`` be None or non-None.
This uses the same underlying mechanism as ``Configuration.items()`` and
does follow the precedence logic described in :ref:`Config Precedence
<config-precedence>`.
At the time of writing, the parts of the codebase that use ``Configuration``
in this manner are: ``ConfigOptionParser``, to transparently include
configuration handling as part of the command line processing logic,
@ -100,14 +108,6 @@ the methods used would be:
.. py:class:: Configuration
.. py:method:: get_value(key)
Provides the value of the given key from the loaded configuration.
The loaded configuration may have ``load_only`` be None or non-None.
This uses the same underlying mechanism as ``Configuration.items()`` and
does follow the precedence logic described in :ref:`Config Precedence
<config-precedence>`.
.. py:method:: get_file_to_edit()
Provides the "highest priority" file, for the :ref:`kind <config-kinds>` of