:return: the text for each element at the configured path if type attribute matches
358194
def _parse_report_item(self, prop):
        

        item_type = None

        if prop == 'attribute_accuracy':
            item_type = 'DQQuanAttAcc'
        elif prop == 'dataset_completeness':
            item_type = 'DQCompOm'

        xroot = self._get_xroot_for(prop)

        parsed = (element_to_dict(e) for e in get_elements(self._xml_tree, xroot))
        parsed = flatten_items(e['children'] for e in parsed if e['attributes'].get('type') == item_type)

        return reduce_value([p['text'] for p in parsed if p['name'] == 'measDesc'])
530820
def _getFullPathName(self, containingNodes):
        
        assert isinstance(containingNodes, list)
        return [(self.options.fullPathNamespace, 'module')] + containingNodes
550345
def get_templates(path: Path) -> List[str]:
    '''
    '''

    result = []

    for item in path.glob('**/*'):
        if item.is_file() and not item.name.startswith('_'):
            result.append(item.relative_to(path.parent).as_posix())

    return result
550054
def _get_path_for_type(type_):
    """"""
    if type_.lower() in CORE_TYPES:
        return Path('index.html#%s' % type_.lower())
    elif '.' in type_:
        namespace, name = type_.split('.')
        return Path('types', namespace, _get_file_name(name))
    else:
        return Path('types',  _get_file_name(type_))
1126620
function get_path(context, path, options = {}) {
	const node = get_node_by_path(context, path, options);
	return node_type(node) == NodeTypes.NODE
		? get_all_node_props(context, node, options)
		: node;
}
251894
def _path(self, attrpath):
        """"""

        attr, _, subpath = attrpath.partition(".")
        if attr not in self.__dict__:
            self.__dict__[attr] = Namespace()
            self.__namespaces.add(attr)

        if subpath:
            return self.__dict__[attr]._path(subpath)
        else:
            return self.__dict__[attr]
173830
def json_path_components(path):
    
    if isinstance(path, str):
        path = path.split('.')

    return list(path)
993322
def path_type(path, target):
    
    if os.path.isfile(path) and target == "file":
        return True
    elif os.path.isdir(path) and target == "directory":
        return True
    else:
        print("Error: Path given is not a {}: {}".format(target, path))
    return False
715708
def get_type(full_path):
    """"""
    status = {'type': []}
    if os.path.ismount(full_path):
        status['type'] += ['mount-point']
    elif os.path.islink(full_path):
        status['type'] += ['symlink']
    if os.path.isfile(full_path):
        status['type'] += ['file']
    elif os.path.isdir(full_path):
        status['type'] += ['dir']
    if not status['type']:
        if os.stat.S_ISSOCK(status['mode']):
            status['type'] += ['socket']
        elif os.stat.S_ISCHR(status['mode']):
            status['type'] += ['special']
        elif os.stat.S_ISBLK(status['mode']):
            status['type'] += ['block-device']
        elif os.stat.S_ISFIFO(status['mode']):
            status['type'] += ['pipe']
    if not status['type']:
        status['type'] += ['unknown']
    elif status['type'] and status['type'][-1] == 'symlink':
        status['type'] += ['broken']
    return status['type']
1251741
def check_path(path):
    
    if path is None or path == b'' or path.startswith(b'/'):
        raise ValueError("illegal path '%s'" % path)

    if (
        (sys.version_info[0] >= 3 and not isinstance(path, bytes)) and
        (sys.version_info[0] == 2 and not isinstance(path, str))
    ):
        raise TypeError("illegale type for path '%r'" % path)

    return path
239870
def include(self, path):
        
        for regex_item in self.regex_list:
            if regex_item.match(path):
                return False
        return True
186647
def __path(self, path):
        
        if path.startswith(self.__prefix):
            return path

        return "{}{}".format(self.__prefix, path)
464542
def match(path)
       if match = @regexp.match(path)
         params = {}
         @named.each_with_index { |name, i| params[name] = match[i + 1] } if @type == :handlers
         {
             path: path,
             title: self.flags.fetch(:title){nil},
             params: params,
             route: self
         }
       else
         false
       end
    end
113032
function lookupType (path, spec, types) {
  const type = (() => {
    const match = R.path(path, spec).match(/^#\/definitions\/(.+)/)
    if (match !== void 0) {
      return match[1]
    } else {
      throw Error(`Reference path does not meet specification: ${path}`)
    }
  })()

  if (type in types) {
    return types[type]
  } else {
    throw Error(`Couldn't find definition for ${type}`)
  }
}
20819
def may_contain_matches(self, path):
        
        path = self._prepare_path(path)
        return self.int_regex.search(path) is not None
223583
def display_paths(instances, type_str):
    """"""
    print('%ss: count=%s' % (type_str, len(instances),))
    for path in [instance.path for instance in instances]:
        print('%s: %s' % (type_str, path))
    if len(instances):
        print('')
643216
def load_path(self, path):
        
        logger.debug("load_path(path=%s)" % path)
        if os.path.isfile(path):
            configtype = self.guess_type(path)
            logger.debug("Detected config type: %s" % self._type_to_str(configtype))
            if configtype in self.TYPES:
                logger.debug("Opening config for reading")
                with open(path, 'r') as f:
                    data = f.read()
                datadict = self.TYPES[configtype]().reverse(data)
                return self.load_data(datadict)
            else:
                raise ValueError("Unsupported config type")
        else:
            logger.warn("load_path couldn't find the path: %s" % path)