tools/android/modularization/convenience/lookup_dep.py
def _compute_toplevel_target(target: str) -> str:
    """Computes top level target from the passed-in sub-target."""
    if target.endswith('_java'):
      return target

    # Handle android_aar_prebuilt() sub targets.
    index = target.find('_java__subjar')
    if index >= 0:
      return target[0:index + 5]
    index = target.find('_java__classes')
    if index >= 0:
      return target[0:index + 5]

    return target
Computes top level target from the passed-in sub-target.
Computes top level target from the passed-in sub-target.
Computes top level target from the passed - in sub - target .
def _compute_toplevel_target(target: str) -> str:
    if target.endswith('_java'):
      return target
    index = target.find('_java__subjar')
    if index >= 0:
      return target[0:index + 5]
    index = target.find('_java__classes')
    if index >= 0:
      return target[0:index + 5]
    return target
def _compute_toplevel_target ( target : str ) -> str : if target . endswith ( '_java' ) : return target index = target . find ( '_java__subjar' ) if index >= 0 : return target [ 0 : index + 5 ] index = target . find ( '_java__classes' ) if index >= 0 : return target [ 0 : index + 5 ] return target
Computes top level target from the passed-in sub-target.
Computes top level target from the passed - in sub - target .
"""Computes top level target from the passed-in sub-target.""" # Handle android_aar_prebuilt() sub targets.
target
str