bundlewrap / bundlewrap

Named lambda expression detected FLK-E731
Anti-pattern
Minor
2 months ago3 years old
do not assign a lambda expression, use a def
  6try:
  7    from functools import cache
  8except ImportError:  # Python 3.8
  9    cache = lambda f: f 10from hashlib import md5
 11from os import getenv, getpid, makedirs, mkdir, rmdir
 12from os.path import basename, dirname, exists, isfile, join, normpath
do not assign a lambda expression, use a def
 39        negate = lambda b: not b
 40        selector = selector[1:]
 41    else:
 42        negate = lambda b: b 43    try:
 44        selector_type, selector_name = selector.split(":", 1)
 45    except ValueError:
do not assign a lambda expression, use a def
 36    all items matching that selector from the given list of items.
 37    """
 38    if selector.startswith("!"):
 39        negate = lambda b: not b 40        selector = selector[1:]
 41    else:
 42        negate = lambda b: b
do not assign a lambda expression, use a def
110        elif self.attributes['manifest_processor'] == 'mako':
111            content_processor = content_processor_mako
112        else:
113            content_processor = lambda item: item._template_content.encode('utf-8')114
115        if self.attributes['manifest'] is not None or self.attributes['manifest_file'] is None:
116            user_manifest = self.attributes['manifest'] or {}