ApeWorX / ethpm-types

Implementation of EIP-2678
Apache License 2.0
14 stars 8 forks source link

fix: allow mypy to detect internalType not required #124

Closed fubuloubu closed 6 months ago

fubuloubu commented 6 months ago

What I did

Prior to this change, any downstream initializations of ABIType without specifying internalType=... in the constructor would raise the typing issue E: Missing named argument "internalType" for "ABIType" [call-arg]. Changing this to a keyword arg allows mypy to correctly detect that this field is not needed.

No functional change

How I did it

How to verify it

I was working downstream and monkeypatched this change, and observed that mypy stopped complaining

Checklist