@@ -45,7 +45,7 @@ class BaseRPC:
4545
4646 namespace : ClassVar [str ]
4747
48- def __init__ (self , url : str , extra_headers : Dict = None ):
48+ def __init__ (self , url : str , extra_headers : Dict | None = None ):
4949 """Initialize BaseRPC class with the given url."""
5050 if extra_headers is None :
5151 extra_headers = {}
@@ -60,7 +60,7 @@ def __init_subclass__(cls) -> None:
6060 namespace = namespace [:- 3 ]
6161 cls .namespace = namespace .lower ()
6262
63- def post_request (self , method : str , * params : Any , extra_headers : Dict = None ) -> Any :
63+ def post_request (self , method : str , * params : Any , extra_headers : Dict | None = None ) -> Any :
6464 """Send JSON-RPC POST request to the client RPC server at port defined in the url."""
6565 if extra_headers is None :
6666 extra_headers = {}
@@ -101,7 +101,7 @@ class EthRPC(BaseRPC):
101101 BlockNumberType = Union [int , Literal ["latest" , "earliest" , "pending" ]]
102102
103103 def __init__ (
104- self , url : str , extra_headers : Dict = None , * , transaction_wait_timeout : int = 60
104+ self , url : str , extra_headers : Dict | None = None , * , transaction_wait_timeout : int = 60
105105 ):
106106 """Initialize EthRPC class with the given url and transaction wait timeout."""
107107 if extra_headers is None :
@@ -257,7 +257,7 @@ class EngineRPC(BaseRPC):
257257 simulators.
258258 """
259259
260- def post_request (self , method : str , * params : Any , extra_headers : Dict = None ) -> Any :
260+ def post_request (self , method : str , * params : Any , extra_headers : Dict | None = None ) -> Any :
261261 """Send JSON-RPC POST request to the client RPC server at port defined in the url."""
262262 if extra_headers is None :
263263 extra_headers = {}
0 commit comments