From 4d0c5720dec23a2d527ccbc4b92ed0927b03f323 Mon Sep 17 00:00:00 2001 From: David Tan Date: Thu, 19 Oct 2017 17:06:43 -0400 Subject: [PATCH] Remove obvious docstrings --- sanic/ip.py | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sanic/ip.py b/sanic/ip.py index d0a7c9d2..e1cedd46 100644 --- a/sanic/ip.py +++ b/sanic/ip.py @@ -44,9 +44,6 @@ NON_PUBLIC_IP_PREFIX = PRIVATE_IP_PREFIX + LOOPBACK_PREFIX def is_valid_ipv4(ip_str): - """ - Check the validity of an IPv4 address - """ try: socket.inet_pton(socket.AF_INET, ip_str) except AttributeError: # pragma: no cover @@ -61,9 +58,6 @@ def is_valid_ipv4(ip_str): def is_valid_ipv6(ip_str): - """ - Check the validity of an IPv6 address - """ try: socket.inet_pton(socket.AF_INET6, ip_str) except socket.error: @@ -72,7 +66,4 @@ def is_valid_ipv6(ip_str): def is_valid_ip(ip_str): - """ - Check the validity of an IP address - """ return is_valid_ipv4(ip_str) or is_valid_ipv6(ip_str)