tools/web_bluetooth/compact_blocklist.py
def ShortenUUID(uuid):
  """Shorten a UUUD that use Bluetooth base UUID.

  Note: this function shortens all UUIDs that use the Bluetooth base
  UUID even though the specification states that only an assigned UUID
  can be shortened. In this case it works fine, since the constructor in
  bluetooth_uuid.cc also works the same way.
  """

  if uuid[8:] == UUID_BASE_POSTFIX:
    new_uuid = '%x' % int(uuid[:8], 16)
    if len(new_uuid) in [4, 8]:
      uuid = new_uuid
  return uuid
Shorten a UUUD that use Bluetooth base UUID.

  Note: this function shortens all UUIDs that use the Bluetooth base
  UUID even though the specification states that only an assigned UUID
  can be shortened. In this case it works fine, since the constructor in
  bluetooth_uuid.cc also works the same way.
  
Shorten a UUUD that use Bluetooth base UUID.
Note: this function shortens all UUIDs that use the Bluetooth base
UUID even though the specification states that only an assigned UUID
can be shortened. In this case it works fine, since the constructor in
bluetooth_uuid.cc also works the same way.
Shorten a UUUD that use Bluetooth base UUID . Note : this function shortens all UUIDs that use the Bluetooth base UUID even though the specification states that only an assigned UUID can be shortened . In this case it works fine since the constructor in bluetooth_uuid . cc also works the same way .
def ShortenUUID(uuid):
  if uuid[8:] == UUID_BASE_POSTFIX:
    new_uuid = '%x' % int(uuid[:8], 16)
    if len(new_uuid) in [4, 8]:
      uuid = new_uuid
  return uuid
def ShortenUUID ( uuid ) : if uuid [ 8 : ] == UUID_BASE_POSTFIX : new_uuid = '%x' % int ( uuid [ : 8 ] , 16 ) if len ( new_uuid ) in [ 4 , 8 ] : uuid = new_uuid return uuid
Shorten a UUUD that use Bluetooth base UUID.
Shorten a UUUD that use Bluetooth base UUID .
"""Shorten a UUUD that use Bluetooth base UUID.

  Note: this function shortens all UUIDs that use the Bluetooth base
  UUID even though the specification states that only an assigned UUID
  can be shortened. In this case it works fine, since the constructor in
  bluetooth_uuid.cc also works the same way.
  """
uuid