Another (slightly ugly) idea for the trim trailing whitespace variable if a default can't be set elsewhere:

    getattr(document, 'EditorConfigPluginTrimWhitespace, None)