Outside the scope of this PR, since status quo, but this looks fragile against importing `enum` under an alias, which @DanielNoord was just looking into at https://github.com/PyCQA/astroid/pull/1587. Probably worth a follow-up issue.