This code produces no error:
from typing import NamedTuple
class A(type): ...
class Foo(NamedTuple, metaclass=A, x=1):
x: int
from enum import Enum
class E(Enum, x=1):
a = 1
It is much easier with the NamedTuple, but, I think that enum might allow some keywords like boundary=STRICT.
So, I think that I will split the PRs for these two problems.
Refs #16432