Bump pre-commit black to 22.1.0
[integration/test.git] / csit / libraries / BGPCEP / ipaddr.py
index 485e26388baf2c78d4d71b09d4db016263a696f9..c0fb69448ff58c0873e7be5b761f8dc261ab1e44 100644 (file)
@@ -146,7 +146,7 @@ def v6_int_to_packed(address):
     Returns:
         The binary representation of this address.
     """
-    return Bytes(struct.pack("!QQ", address >> 64, address & (2 ** 64 - 1)))
+    return Bytes(struct.pack("!QQ", address >> 64, address & (2**64 - 1)))
 
 
 def _find_address_range(addresses):
@@ -255,7 +255,7 @@ def summarize_address_range(first, last):
         nbits = _count_righthand_zero_bits(first_int, ip_bits)
         current = None
         while nbits >= 0:
-            addend = 2 ** nbits - 1
+            addend = 2**nbits - 1
             current = first_int + addend
             nbits -= 1
             if current <= last_int:
@@ -1094,7 +1094,7 @@ class _BaseV4(object):
     """
 
     # Equivalent to 255.255.255.255 or 32 bits of 1's.
-    _ALL_ONES = (2 ** IPV4LENGTH) - 1
+    _ALL_ONES = (2**IPV4LENGTH) - 1
     _DECIMAL_DIGITS = frozenset("0123456789")
 
     def __init__(self, address):
@@ -1410,7 +1410,7 @@ class _BaseV6(object):
 
     """
 
-    _ALL_ONES = (2 ** IPV6LENGTH) - 1
+    _ALL_ONES = (2**IPV6LENGTH) - 1
     _HEXTET_COUNT = 8
     _HEX_DIGITS = frozenset("0123456789ABCDEFabcdef")