From 70ce4ed4b497593c7fae05df3af5154d30422535 Mon Sep 17 00:00:00 2001 From: Vladimir Lagunov Date: Mon, 1 Jul 2019 18:36:39 +0700 Subject: [PATCH] IDEA-CR-48777: PY-34633 Python docker-compose, code review: style fixes (cherry picked from commit 26c6ffdb2e37b46b23a332ea677db92de7756fcc) GitOrigin-RevId: 837102a9ca6852fd4426518f0b8afe4b0e1228ac --- python/helpers/pydev/_pydev_bundle/pydev_localhost.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/python/helpers/pydev/_pydev_bundle/pydev_localhost.py b/python/helpers/pydev/_pydev_bundle/pydev_localhost.py index cb3da92ec295..b35584a337c7 100644 --- a/python/helpers/pydev/_pydev_bundle/pydev_localhost.py +++ b/python/helpers/pydev/_pydev_bundle/pydev_localhost.py @@ -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():