Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Yun Zheng Hu <[email protected]>
  • Loading branch information
Miauwkeru and yunzheng authored Oct 9, 2024
1 parent dd149df commit 4a21763
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flow/record/fieldtypes/net/ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ipaddress(FieldType):
def __init__(self, addr: str | int | bytes):
self.val = ip_address(addr)

def __eq__(self, b: str | int | bytes) -> bool:
def __eq__(self, b: str | int | bytes | _IPAddress) -> bool:
try:
return self.val == ip_address(b)
except ValueError:
Expand Down Expand Up @@ -59,7 +59,7 @@ class ipnetwork(FieldType):
def __init__(self, addr: str | int | bytes):
self.val = ip_network(addr)

def __eq__(self, b: str | int | bytes) -> bool:
def __eq__(self, b: str | int | bytes | _IPNetwork) -> bool:
try:
return self.val == ip_network(b)
except ValueError:
Expand Down

0 comments on commit 4a21763

Please sign in to comment.