Skip to content

Commit 11c2b5c

Browse files
committed
Update utils.py
1 parent c884d23 commit 11c2b5c

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

faster_ens/utils.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,11 @@ def sha3_text(val: Union[str, bytes]) -> HexBytes:
208208
return Web3().keccak(val)
209209

210210
@sha3_text.register(str)
211-
def _(val: str) -> HexBytes:
211+
def sha3_text_str(val: str) -> HexBytes:
212212
return Web3().keccak(val.encode("utf-8"))
213213

214214
@sha3_text.register(bytes)
215-
def _(val: bytes) -> HexBytes:
215+
def sha3_text_bytes(val: bytes) -> HexBytes:
216216
return Web3().keccak(val)
217217

218218

@@ -294,15 +294,15 @@ def is_none_or_zero_address(addr: Union[Address, ChecksumAddress, HexAddress, No
294294
return not addr or addr == EMPTY_ADDR_HEX
295295

296296
@is_none_or_zero_address.register(type(None))
297-
def _(addr: Literal[None]) -> bool:
297+
def is_none_or_zero_address_none(addr: Literal[None]) -> bool:
298298
return True
299299

300300
@is_none_or_zero_address.register(str)
301-
def _(addr: str) -> bool:
301+
def is_none_or_zero_address_str(addr: str) -> bool:
302302
return not addr or addr == EMPTY_ADDR_HEX
303303

304304
@is_none_or_zero_address.register(bytes)
305-
def _(addr: bytes) -> bool:
305+
def is_none_or_zero_address_bytes(addr: bytes) -> bool:
306306
return not addr
307307

308308

@@ -311,11 +311,11 @@ def is_empty_name(name: Optional[str]) -> bool: # sourcery skip: collection-int
311311
return name is None or name.strip() in ("", ".")
312312

313313
@is_empty_name.register(type(None))
314-
def _(name: Literal[None]) -> bool: # sourcery skip: collection-into-set
314+
def is_empty_name_none(name: Literal[None]) -> bool: # sourcery skip: collection-into-set
315315
return True
316316

317317
@is_empty_name.register(str)
318-
def _(name: str) -> bool: # sourcery skip: collection-into-set
318+
def is_empty_name_str(name: str) -> bool: # sourcery skip: collection-into-set
319319
return name.strip() in ("", ".")
320320

321321

0 commit comments

Comments
 (0)