Right now, if you use hexbytes.HexBytes in a spot expecting eth_pydantic_types.HexBytes, mypy gets mad.
I'd like to integrate with mypy to ignore these concerns automatically.
Specification
from chat gpt:
from typing import Callable
from mypy.plugin import Plugin
from mypy.nodes import TypeInfo, ClassDef
class HexBytesPlugin(Plugin):
def get_class_decorator_hook(self, fullname: str) -> Callable[[TypeInfo], None]:
if fullname == "HexBytes": # Adjust the condition based on your identification logic
return self.handle_hexbytes_class
return lambda cls: None
def handle_hexbytes_class(self, cls: ClassDef) -> None:
# Adjust the class definition or type information for HexBytes as needed
pass
def plugin(version: str):
return HexBytesPlugin
Dependencies
Include links to any open issues that must be resolved before this feature can be implemented.
Overview
Right now, if you use hexbytes.HexBytes in a spot expecting eth_pydantic_types.HexBytes, mypy gets mad. I'd like to integrate with mypy to ignore these concerns automatically.
Specification
from chat gpt:
Dependencies
Include links to any open issues that must be resolved before this feature can be implemented.