Closed as not planned
Description
Bug report
Bug description:
I'm aware that __static_attributes__
is only intented to be a heuristic (#123860),
but perhaps dataclasses are common enough to warrant inclusion?
@dataclass
class A:
x: int
# non-dataclass equivalent
class B:
x: int
def __init__(self, x):
self.x = x
print(A.__static_attributes__) # (), but expected ('x', )
print(B.__static_attributes__) # ('x',)
CPython versions tested on:
3.13, 3.14
Operating systems tested on:
macOS