Infer user-defined enum classes by checking if the class is a subtype of ``enum.Enum`` (#2277) (#2298)

(cherry picked from commit c5352d5)
Co-authored-by: Jacob Walls <jacobtylerwalls@gmail.com>

Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
3 files changed