diff options
Diffstat (limited to 'docs/userguide')
| -rw-r--r-- | docs/userguide/declarative_config.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/userguide/declarative_config.txt b/docs/userguide/declarative_config.txt index b40d3a4a..2aa1c717 100644 --- a/docs/userguide/declarative_config.txt +++ b/docs/userguide/declarative_config.txt @@ -92,7 +92,7 @@ Metadata and options are set in the config sections of the same name. * In some cases, complex values can be provided in dedicated subsections for clarity. -* Some keys allow ``file:``, ``attr:``, and ``find:`` and ``find_namespace:`` directives in +* Some keys allow ``file:``, ``attr:``, ``find:``, and ``find_namespace:`` directives in order to cover common usecases. * Unknown keys are ignored. @@ -146,6 +146,12 @@ Special directives: * ``attr:`` - Value is read from a module attribute. ``attr:`` supports callables and iterables; unsupported types are cast using ``str()``. + + In order to support the common case of a literal value assigned to a variable + in a module containing (directly or indirectly) third-party imports, + ``attr:`` first tries to read the value from the module by examining the + module's AST. If that fails, ``attr:`` falls back to importing the module. + * ``file:`` - Value is read from a list of files and then concatenated @@ -237,4 +243,4 @@ data_files dict 40.6.0 Notes: 1. In the `package_data` section, a key named with a single asterisk (`*`) -refers to all packages, in lieu of the empty string used in `setup.py`.
\ No newline at end of file +refers to all packages, in lieu of the empty string used in `setup.py`. |
