Collect "extra == ..." operands from a marker.

    Returns a list of str. Each str is a speficied extra in this marker.
325396
def get_contained_extras(marker):
    
    if not marker:
        return set()
    marker = Marker(str(marker))
    extras = set()
    _markers_collect_extras(marker._markers, extras)
    return extras
930426
def Plus(self, other):
    
    return Point(self.x + other.x,
                 self.y + other.y,
                 self.z + other.z)
498352
function (extraPoints) {
		var points = this._getProjectedPoints(),
			len = points ? points.length : 0;
		// Increment length by extraPoints if present
		len += extraPoints || 0;

		return !points || len <= 3;
	}
1267330
protected Map<String, String> getExtra(Dsn dsn) {
        return Util.parseExtra(Lookup.lookup(EXTRA_OPTION, dsn));
    }
1196701
def _parse_extra_args(self, api, extra_args_raw):
        
        extra_args = {}

        def invalid(msg, extra_arg_raw):
            print('Invalid --extra-arg:%s: %s' % (msg, extra_arg_raw),
                  file=sys.stderr)
            sys.exit(1)

        for extra_arg_raw in extra_args_raw:
            try:
                extra_arg = json.loads(extra_arg_raw)
            except ValueError as e:
                invalid(str(e), extra_arg_raw)

            # Validate extra_arg JSON blob
            if 'match' not in extra_arg:
                invalid('No match key', extra_arg_raw)
            elif (not isinstance(extra_arg['match'], list) or
                  len(extra_arg['match']) != 2):
                invalid('match key is not a list of two strings', extra_arg_raw)
            elif (not isinstance(extra_arg['match'][0], six.text_type) or
                  not isinstance(extra_arg['match'][1], six.text_type)):
                print(type(extra_arg['match'][0]))
                invalid('match values are not strings', extra_arg_raw)
            elif 'arg_name' not in extra_arg:
                invalid('No arg_name key', extra_arg_raw)
            elif not isinstance(extra_arg['arg_name'], six.text_type):
                invalid('arg_name is not a string', extra_arg_raw)
            elif 'arg_type' not in extra_arg:
                invalid('No arg_type key', extra_arg_raw)
            elif not isinstance(extra_arg['arg_type'], six.text_type):
                invalid('arg_type is not a string', extra_arg_raw)
            elif ('arg_docstring' in extra_arg and
                  not isinstance(extra_arg['arg_docstring'], six.text_type)):
                invalid('arg_docstring is not a string', extra_arg_raw)

            attr_key, attr_val = extra_arg['match'][0], extra_arg['match'][1]
            extra_args.setdefault(attr_key, {})[attr_val] = \
                (extra_arg['arg_name'], extra_arg['arg_type'],
                 extra_arg.get('arg_docstring'))

        # Extra arguments, keyed on data type objects.
        extra_args_for_types = {}
        # Locate data types that contain extra arguments
        for namespace in api.namespaces.values():
            for route in namespace.routes:
                extra_parameters = []
                if is_user_defined_type(route.arg_data_type):
                    for attr_key in route.attrs:
                        if attr_key not in extra_args:
                            continue
                        attr_val = route.attrs[attr_key]
                        if attr_val in extra_args[attr_key]:
                            extra_parameters.append(extra_args[attr_key][attr_val])
                if len(extra_parameters) > 0:
                    extra_args_for_types[route.arg_data_type] = extra_parameters

        return extra_args_for_types
1265748
def strip_extras(requirement):
    
    line = requirement.as_line()
    new = type(requirement).from_line(line)
    new.extras = None
    return new
1275276
def p_expr_plus_expr(p):
    
    p[0] = make_binary(p.lineno(2), 'PLUS', p[1], p[3], lambda x, y: x + y)
129969
def pull_int_tail(self, string: str) -> str:
        '''  '''
        int_tail = ''
        for element in string[::-1]:
            try:
                int(element)
                int_tail = element + int_tail
            except:
                pass
        return int_tail
1165215
def find_extra(self, record):
        
        rv = vars(record).copy()
        for key in ('name', 'msg', 'args', 'levelname', 'levelno',
                    'pathname', 'filename', 'module', 'exc_info',
                    'exc_text', 'lineno', 'funcName', 'created',
                    'msecs', 'relativeCreated', 'thread', 'threadName',
                    'processName', 'process'):
            rv.pop(key, None)
        return rv
798780
def valueFromString(self, value, extra=None, db=None):
        
        return projex.text.nativestring(value).lower() == 'true'
1292602
def get_contained_pyversions(marker):
    

    collection = []
    if not marker:
        return set()
    marker = _ensure_marker(marker)
    # Collect the (Variable, Op, Value) tuples and string joiners from the marker
    _markers_collect_pyversions(marker._markers, collection)
    marker_str = " and ".join(sorted(collection))
    if not marker_str:
        return set()
    # Use the distlib dictionary parser to create a dictionary 'trie' which is a bit
    # easier to reason about
    marker_dict = distlib.markers.parse_marker(marker_str)[0]
    version_set = set()
    pyversions, _ = parse_marker_dict(marker_dict)
    if isinstance(pyversions, set):
        version_set.update(pyversions)
    elif pyversions is not None:
        version_set.add(pyversions)
    # Each distinct element in the set was separated by an "and" operator in the marker
    # So we will need to reduce them with an intersection here rather than a union
    # in order to find the boundaries
    versions = set()
    if version_set:
        versions = reduce(lambda x, y: x & y, version_set)
    return versions
1324872
def only_extras(self):
        
        known = [key for key in self._dict.keys() if key in self.c_param]
        if not known:
            return True
        else:
            return False
55951
def extra(self, value, extra_name, default=None):
        
        try:
            return self.get(value).get(extra_name, default)
        except InvalidEnumItem:
            return default
477712
def get_string_plus_property_value(value):
    # type: (Any) -> Optional[List[str]]
    
    if value:
        if isinstance(value, str):
            return [value]
        if isinstance(value, list):
            return value
        if isinstance(value, tuple):
            return list(value)

    return None
814264
public void collectMarkerSpecification(VariableSpecifications boundNames)
    {
        if (collectionElement != null)
            collectionElement.collectMarkerSpecification(boundNames);

        if (operator.equals(Operator.IN) && inValues != null)
        {
            for (Term value : inValues)
                value.collectMarkerSpecification(boundNames);
        }
        else
        {
            value.collectMarkerSpecification(boundNames);
        }
    }
1095086
def extras_to_string(extras):
    # type: (Iterable[S]) -> S
    """"""
    if isinstance(extras, six.string_types):
        if extras.startswith("["):
            return extras
        else:
            extras = [extras]
    if not extras:
        return ""
    return "[{0}]".format(",".join(sorted(set(extras))))
22496
def getAllTriples(self):
        
        return [(str(s), str(p), str(o)) for s, p, o in self]