def avoid_complex_comprehension_noncompliant()

in src/python/detectors/code_readability/code_readability.py [0:0]


def avoid_complex_comprehension_noncompliant():
    text = [['bar', 'pie', 'line'],
            ['Rome', 'Madrid', 'Houston'],
            ['aa', 'bb', 'cc', 'dd']]
    # Noncompliant: list comprehensions with more than two control
    # sub expressions are hard to read and maintain.
    text_3 = [y.upper() for x in text if len(x) == 3 for y in x
              if y.startswith('f')]