[BUG][python] Fix PEP8 E111 issue in rest.mustache (#12229)

* Fix PEP8 E111 issue

* Update samples
This commit is contained in:
Dmitry Vasilev 2022-04-25 12:00:27 +03:00 committed by GitHub
parent 4ee5f72214
commit 6f1fa4592b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 30 additions and 30 deletions

View File

@ -290,10 +290,10 @@ def is_ipv4(target):
""" Test if IPv4 address or not
"""
try:
chk = ipaddress.IPv4Address(target)
return True
chk = ipaddress.IPv4Address(target)
return True
except ipaddress.AddressValueError:
return False
return False
def in_ipv4net(target, net):
""" Test if target belongs to given IPv4 network
@ -333,6 +333,6 @@ def should_bypass_proxies(url, no_proxy=None):
if is_ipv4(parsed.hostname):
for item in entries:
if in_ipv4net(parsed.hostname, item):
return True
if in_ipv4net(parsed.hostname, item):
return True
return proxy_bypass_environment(parsed.hostname, {'no': no_proxy} )

View File

@ -298,10 +298,10 @@ def is_ipv4(target):
""" Test if IPv4 address or not
"""
try:
chk = ipaddress.IPv4Address(target)
return True
chk = ipaddress.IPv4Address(target)
return True
except ipaddress.AddressValueError:
return False
return False
def in_ipv4net(target, net):
""" Test if target belongs to given IPv4 network
@ -341,6 +341,6 @@ def should_bypass_proxies(url, no_proxy=None):
if is_ipv4(parsed.hostname):
for item in entries:
if in_ipv4net(parsed.hostname, item):
return True
if in_ipv4net(parsed.hostname, item):
return True
return proxy_bypass_environment(parsed.hostname, {'no': no_proxy} )

View File

@ -298,10 +298,10 @@ def is_ipv4(target):
""" Test if IPv4 address or not
"""
try:
chk = ipaddress.IPv4Address(target)
return True
chk = ipaddress.IPv4Address(target)
return True
except ipaddress.AddressValueError:
return False
return False
def in_ipv4net(target, net):
""" Test if target belongs to given IPv4 network
@ -341,6 +341,6 @@ def should_bypass_proxies(url, no_proxy=None):
if is_ipv4(parsed.hostname):
for item in entries:
if in_ipv4net(parsed.hostname, item):
return True
if in_ipv4net(parsed.hostname, item):
return True
return proxy_bypass_environment(parsed.hostname, {'no': no_proxy} )

View File

@ -298,10 +298,10 @@ def is_ipv4(target):
""" Test if IPv4 address or not
"""
try:
chk = ipaddress.IPv4Address(target)
return True
chk = ipaddress.IPv4Address(target)
return True
except ipaddress.AddressValueError:
return False
return False
def in_ipv4net(target, net):
""" Test if target belongs to given IPv4 network
@ -341,6 +341,6 @@ def should_bypass_proxies(url, no_proxy=None):
if is_ipv4(parsed.hostname):
for item in entries:
if in_ipv4net(parsed.hostname, item):
return True
if in_ipv4net(parsed.hostname, item):
return True
return proxy_bypass_environment(parsed.hostname, {'no': no_proxy} )

View File

@ -298,10 +298,10 @@ def is_ipv4(target):
""" Test if IPv4 address or not
"""
try:
chk = ipaddress.IPv4Address(target)
return True
chk = ipaddress.IPv4Address(target)
return True
except ipaddress.AddressValueError:
return False
return False
def in_ipv4net(target, net):
""" Test if target belongs to given IPv4 network
@ -341,6 +341,6 @@ def should_bypass_proxies(url, no_proxy=None):
if is_ipv4(parsed.hostname):
for item in entries:
if in_ipv4net(parsed.hostname, item):
return True
if in_ipv4net(parsed.hostname, item):
return True
return proxy_bypass_environment(parsed.hostname, {'no': no_proxy} )

View File

@ -298,10 +298,10 @@ def is_ipv4(target):
""" Test if IPv4 address or not
"""
try:
chk = ipaddress.IPv4Address(target)
return True
chk = ipaddress.IPv4Address(target)
return True
except ipaddress.AddressValueError:
return False
return False
def in_ipv4net(target, net):
""" Test if target belongs to given IPv4 network
@ -341,6 +341,6 @@ def should_bypass_proxies(url, no_proxy=None):
if is_ipv4(parsed.hostname):
for item in entries:
if in_ipv4net(parsed.hostname, item):
return True
if in_ipv4net(parsed.hostname, item):
return True
return proxy_bypass_environment(parsed.hostname, {'no': no_proxy} )