The config parameter include_reference_documentation is somehow rendered to a string when set in PyProject.toml, and the falsey check doesn't work. This change checks the string values "", "false", and "False" to correctly enable this feature.
The second change ensures that in the case of empty string, include_reference_documentation="", there is no KeyError during cleanup.
I've retained the original truthy evaluation in case there is some code path that uses it, for example, if it gets it directly from the default config Python file.
The config parameter
include_reference_documentation
is somehow rendered to a string when set in PyProject.toml, and the falsey check doesn't work. This change checks the string values "", "false", and "False" to correctly enable this feature.The second change ensures that in the case of empty string,
include_reference_documentation=""
, there is no KeyError during cleanup.I've retained the original truthy evaluation in case there is some code path that uses it, for example, if it gets it directly from the default config Python file.