mypy error attr-defined
https://mypy.readthedocs.io/en/stable/error_code_list.html#check-that-attribute-exists-attr-defined
#mypy
Mypy checks that an attribute is defined in the target class or module when using the dot operator.
frozen=Trueにしたdataclassで、object.__setattr__を使って属性を設定したらmypyに怒られた
self.x形式の代入ではないからattr-defined error
object.__setattr__を使わなければならないところでこのエラーが出ないようにするにはどうするのか、は宿題
別のケース:継承で発生
error: "MyEnvBuilder" has no attribute "_call_new_python" [attr-defined]
_call_new_pythonは親クラスのEnvBuilderにある
https://github.com/python/cpython/blob/v3.12.4/Lib/venv/__init__.py#L369
MyEnvBuilderクラスに見つからないようなので、super()するだけの_call_new_pythonメソッドを定義した
解決したが、これでいいのか不明(そもそもなぜ親クラスの_call_new_pythonをmypyは見つけられない?)