Skip to content

Commit

Permalink
Lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jaysonsantos committed Jan 8, 2025
1 parent 6ce3f00 commit 735de77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bmemcached/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def is_ip_address(address):
return True
except ValueError:
return False

if is_ip_address(server):
return server, default_port

Expand Down
4 changes: 2 additions & 2 deletions test/test_server_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ def testIPv6(self):
server = bmemcached.protocol.Protocol('2001:db8::2')
self.assertEqual(server.host, '2001:db8::2')
self.assertEqual(server.port, 11211)
# Since `2001:db8::2:8080` is a valid IPv6 address,
# Since `2001:db8::2:8080` is a valid IPv6 address,
# it is ambiguous whether to split it into `2001:db8::2` and `8080`
# or treat it as `2001:db8::2:8080`.
# or treat it as `2001:db8::2:8080`.
# Therefore, it will be treated as `2001:db8::2:8080`.
server = bmemcached.protocol.Protocol('2001:db8::2:8080')
self.assertEqual(server.host, '2001:db8::2:8080')
Expand Down

0 comments on commit 735de77

Please sign in to comment.