src/eric7/EricNetwork/EricNetworkUtilities.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9653
e67609152c5e
--- a/src/eric7/EricNetwork/EricNetworkUtilities.py	Wed Jul 13 11:16:20 2022 +0200
+++ b/src/eric7/EricNetwork/EricNetworkUtilities.py	Wed Jul 13 14:55:47 2022 +0200
@@ -13,7 +13,7 @@
 def isValidAddress(address):
     """
     Public function to check, if the given address is valid.
-    
+
     @param address IPv4 or IPv6 address string
     @type str
     @return flag indicating validity
@@ -26,7 +26,7 @@
 def isValidIPv4Address(address):
     """
     Public function to check, if the given address is a valid IPv4 address.
-    
+
     @param address IPv4 address string
     @type str
     @return flag indicating validity
@@ -34,15 +34,15 @@
     """
     h = QHostAddress(address)
     return (
-        not h.isNull() and
-        h.protocol() == QAbstractSocket.NetworkLayerProtocol.IPv4Protocol
+        not h.isNull()
+        and h.protocol() == QAbstractSocket.NetworkLayerProtocol.IPv4Protocol
     )
 
 
 def isValidIPv6Address(address):
     """
     Public function to check, if the given address is a valid IPv6 address.
-    
+
     @param address IPv6 address string
     @type str
     @return flag indicating validity
@@ -50,6 +50,6 @@
     """
     h = QHostAddress(address)
     return (
-        not h.isNull() and
-        h.protocol() == QAbstractSocket.NetworkLayerProtocol.IPv6Protocol
+        not h.isNull()
+        and h.protocol() == QAbstractSocket.NetworkLayerProtocol.IPv6Protocol
     )

eric ide

mercurial