IDEA-CR-48777: PY-34633 Python docker-compose, code review: style fixes

(cherry picked from commit 26c6ffdb2e37b46b23a332ea677db92de7756fcc)

GitOrigin-RevId: 837102a9ca6852fd4426518f0b8afe4b0e1228ac
This commit is contained in:
Vladimir Lagunov
2019-07-04 09:02:24 +03:00
committed by intellij-monorepo-bot
parent 62f6c087c7
commit 70ce4ed4b4
@@ -14,13 +14,10 @@ def is_localhost(hostname):
This function does not perform DNS lookup.
Use it in combination with `get_localhost`.
:param hostname Domain name or IPv4/IPv6 address.
:param hostname: Domain name or IPv4/IPv6 address.
:return: True if specified host is a local host.
"""
return (hostname == 'localhost'
or hostname == 'localhost.localdomain'
or hostname == '127.0.0.1'
or hostname == '::1')
return hostname in ('localhost', 'localhost.localdomain', '127.0.0.1', '::1')
def get_localhost():