I think this is less clear than

    if document.EditorConfigPluginTrimWhitespace:

Maybe EditorConfigPluginTrimWhitespace should be set to a default value of `False` in `set_config` or in some initialization function if that doesn't work (due to calling order).