Get the type of a route
332427
function routeType(route) {
	var fields = Object.keys(RouteTypeFields);
	for (var i = 0, len = fields.length; i < len; i++) {
		var field = fields[i];
		if (route[field]) {
			return RouteTypeFields[field];
		}
	}
	return 'unknown';
}
1125551
def match_route(self, reqpath):
        """"""
        route_dicts = [routes for _, routes in self.api.http.routes.items()][0]
        routes = [route for route, _ in route_dicts.items()]
        if reqpath not in routes:
            for route in routes:  # replace params in route with regex
                reqpath = re.sub('^(/v\d*/?)', '/', reqpath)
                base_url = getattr(self.api.http, 'base_url', '')
                reqpath = reqpath.replace(base_url, '', 1) if base_url else reqpath
                if re.match(re.sub(r'/{[^{}]+}', r'/[\\w-]+', route) + '$', reqpath):
                    return route

        return reqpath
1334550
def _get_deprecation_warning(self, route):
        """"""
        result = ''
        if route.deprecated:
            msg = '{} is deprecated.'.format(fmt_route_func(route))
            if route.deprecated.by:
                msg += ' Use {}.'.format(fmt_var(route.deprecated.by.name))
            result = ' __deprecated_msg("{}")'.format(msg)
        return result
322103
def _get_tuple_from_route(route):
    
    if isinstance(route, tuple):
        assert len(route) >= 2
        pattern, handler_class = route[:2]
    elif isinstance(route, tornado.web.URLSpec):
        pattern, handler_class = route.regex.pattern, route.handler_class
    else:
        raise TypeError("Unknown route type '{}'"
                        .format(type(route).__name__))

    methods = []
    route_re = re.compile(pattern)
    route_params = set(list(route_re.groupindex.keys()) + ['self'])
    for http_method in HTTP_METHODS:
        method = getattr(handler_class, http_method, None)
        if method:
            method = extract_method(method)
            method_params = set(getattr(method, "__argspec_args",
                                        inspect.getargspec(method).args))
            if route_params.issubset(method_params) and \
                    method_params.issubset(route_params):
                methods.append(http_method)

    return pattern, handler_class, methods
132732
def get_routertypes(self, context, filters=None, fields=None,
                        sorts=None, limit=None, marker=None,
                        page_reverse=False):
        """"""
        pass
659541
def _get_route_info(self, request):
        """"""
        resolve_match = resolve(request.path)

        app_name = resolve_match.app_name    # The application namespace for the URL pattern that matches the URL.
        namespace = resolve_match.namespace  # The instance namespace for the URL pattern that matches the URL.
        url_name = resolve_match.url_name    # The name of the URL pattern that matches the URL.
        view_name = resolve_match.view_name  # Name of the view that matches the URL, incl. namespace if there's one.

        return {
            "app_name": app_name or None,
            "namespace": namespace or None,
            "url_name": url_name or None,
            "view_name": view_name or None,
        }
168925
def get_type(t):
    
    if isinstance(t, UserDefinedType):
        if isinstance(t.type, Contract):
            return 'address'
    return str(t)
482391
function routeAndCorrectedPathIndexes(routes, pathIndex) {
        for(var n=0; n<routes.length; n++) {
            var pathIndexes = routes[n].pathIndexes
            if(pathIndexes.start <= pathIndex && pathIndex <= pathIndexes.end || routes[n].route.isDefault) {
                return {routeIndex: n, pathIndex: pathIndexes.start}
            }
        }
        // else
        return {routeIndex: routes.length, pathIndex: pathIndex}
    }
667697
def run_check_kind(_):
    '''
    
    '''
    for kindv in router_post:
        for rec_cat in MCategory.query_all(kind=kindv):
            catid = rec_cat.uid
            catinfo = MCategory.get_by_uid(catid)
            for rec_post2tag in MPost2Catalog.query_by_catid(catid):
                postinfo = MPost.get_by_uid(rec_post2tag.post_id)
                if postinfo.kind == catinfo.kind:
                    pass
                else:
                    print(postinfo.uid)
751198
def get_path_type(path_):
    
    """
    path_type = ''
    if isfile(path_):
        path_type += 'file'
    if isdir(path_):
        path_type += 'directory'
    if islink(path_):
        path_type += 'link'
    if ismount(path_):
        path_type += 'mount'
    return path_type
717091
private function parseMethodTypes($routes = array())
    {
        $parsed = array();

        foreach ($routes as $route) {
            if ($route[0] === "*") {
                $route[0] = "HEAD|GET|PUT|POST|UPDATE|DELETE|OPTIONS";
            }
            $parsed[] = $route;
        }

        return $parsed;
    }
830266
function matchRoutes(routes, path, query) {
  query = query === undefined ? {} : isString(query) ? qs.parse(query) : query;
  return matchRoutesImpl(routes, path, query);
}
341425
def _get_default_route_args(
            self,
            namespace,  # pylint: disable=unused-argument
            route,
            tag=False):
        """"""
        data_type, _ = unwrap_nullable(route.arg_data_type)
        if is_struct_type(data_type):
            arg_list = []
            for field in data_type.all_fields:
                if not field.has_default and not is_nullable_type(
                        field.data_type):
                    arg_list.append((fmt_var(field.name), fmt_type(
                        field.data_type, tag=tag)))

            doc_list = ([(fmt_var(f.name), self.process_doc(f.doc, self._docf))
                         for f in data_type.fields
                         if f.doc and not f.has_default and
                         not is_nullable_type(f.data_type)])
        else:
            arg_list = []
            doc_list = []

        return arg_list, doc_list
805677
def get_routes(iface):
    '''
    
    '''

    filename = os.path.join(_DEB_NETWORK_UP_DIR, 'route-{0}'.format(iface))
    results = _read_file(filename)

    filename = os.path.join(_DEB_NETWORK_DOWN_DIR, 'route-{0}'.format(iface))
    results += _read_file(filename)

    return results
1148254
def get_route_io_data_types_for_route(self, route):
        # type: (ApiRoute) -> typing.Set[UserDefined]
        
        data_types = set()  # type: typing.Set[UserDefined]
        for dtype in (route.arg_data_type, route.result_data_type, route.error_data_type):
            while is_list_type(dtype) or is_nullable_type(dtype):
                data_list_type = dtype  # type: typing.Any
                dtype = data_list_type.data_type
            if is_composite_type(dtype) or is_alias(dtype):
                data_user_type = dtype  # type: typing.Any
                data_types.add(data_user_type)
        return data_types
1195133
def get(self, route: str(), callback: object()):
        
        self.__set_route('get', {route: callback})
        return RouteMapping
1279768
function getRouteParams(route, params) {
  var routeParams = {};

  if (!route.path) return routeParams;

  (0, _PatternUtils.getParamNames)(route.path).forEach(function (p) {
    if (Object.prototype.hasOwnProperty.call(params, p)) {
      routeParams[p] = params[p];
    }
  });

  return routeParams;
}