Ensures all 'targets' have types. If this is not so, exists with
        error.
169089
def __ensure_type (targets):
    
    assert is_iterable_typed(targets, virtual_target.VirtualTarget)
    for t in targets:
        if not t.type ():
            get_manager().errors()("target '%s' has no type" % str (t))
812285
def validate_target(self, target):
        """"""

        archs = target.split('/')

        for arch in archs:
            if not arch in self.archs:
                return False

        return True
650491
protected void checkTypes(TermType expectedBaseType, TermType argumentType) {
        if (argumentType.isAbstract())
            throw new AbstractTermTypeException(argumentType);

        if (!argumentType.isA(expectedBaseType)) {
            throw new IncompatibleTermException(expectedBaseType, argumentType);
        }
    }
616480
def check_types(key='root', expected=TYPES, actual=self, opts={})
      bad_type(key, expected, actual, opts) unless actual.is_a? expected.class
      case actual
      when Hash then actual.each { |k, v| check_types(k, expected[k], v) }
      when Enumerable then actual.each { |v| check_types(key, expected.first, v, enum: true) }
      end
    end
1031563
def Validate(self, type_names):
    """"""
    errs = [n for n in self._RDFTypes(type_names) if not self._GetClass(n)]
    if errs:
      raise DefinitionError("Undefined RDF Types: %s" % ",".join(errs))
1125639
function prepareTypesArg (types) {
  if (Array.isArray(types)) {
    return types
  }
  if (types instanceof String) {
    types += ''
  }
  if (typeof types === 'string') {
    return types.trim().split(' ').filter(Boolean)
  }
  return [types]
}
955734
def _valid_other_type(x, types):
    
    return all(any(isinstance(el, t) for t in types) for el in np.ravel(x))
667017
function(type, checks) {
		var result = false;
		var list = this._trackedtypes[type];
		if (list) {
			result = !checks || this._haschecks(list, checks);
		}
		return result;
	}
759565
def match_type(mtype, patterns):
    ''''''
    for p in patterns:
        if fnmatch.fnmatch(mtype, p):
            return True
    return False
1029456
def types(**requirements):
    

    def predicate(args):
        for name, kind in sorted(requirements.items()):
            assert hasattr(args, name), "missing required argument `%s`" % name

            if not isinstance(kind, tuple):
                kind = (kind,)

            if not any(isinstance(getattr(args, name), k) for k in kind):
                return False

        return True

    return condition("the types of arguments must be valid", predicate, True)
332970
def _generate_legacy_type_checks(types=()):
    
    types = dict(types)

    def gen_type_check(pytypes):
        pytypes = _utils.flatten(pytypes)

        def type_check(checker, instance):
            if isinstance(instance, bool):
                if bool not in pytypes:
                    return False
            return isinstance(instance, pytypes)

        return type_check

    definitions = {}
    for typename, pytypes in iteritems(types):
        definitions[typename] = gen_type_check(pytypes)

    return definitions
214009
def is_type_target(self):
        
        if self._is_type_target is None:
            #All we need to do is search through the custom types in the parent
            #module and see if any of their executables points to this method.
            self._is_type_target = False
            for tkey in self.module.types:
                custype = self.module.types[tkey]
                for execkey, execinst in custype.executables.items():
                    if execinst.target is self:
                        self._is_type_target = custype
                        break
                if self._is_type_target:
                    break

        return self._is_type_target
262379
def apply_injectables(self, targets):
    """"""
    target_types = {type(t) for t in targets}
    target_subsystem_deps = {s for s in itertools.chain(*(t.subsystems() for t in target_types))}
    for subsystem in target_subsystem_deps:
      # TODO: The is_initialized() check is primarily for tests and would be nice to do away with.
      if issubclass(subsystem, InjectablesMixin) and subsystem.is_initialized():
        subsystem.global_instance().injectables(self)
195517
static void checkTypes(ImmutableList<Type> types, Iterable<? extends Expression> exprs) {
    int size = Iterables.size(exprs);
    checkArgument(
        size == types.size(),
        "Supplied the wrong number of parameters. Expected %s, got %s",
        types.size(),
        size);
    // checkIsAssignableTo is an no-op if DEBUG is false
    if (Flags.DEBUG) {
      int i = 0;
      for (Expression expr : exprs) {
        expr.checkAssignableTo(types.get(i), "Parameter %s", i);
        i++;
      }
    }
  }
394627
def setAllowedTypes(self, allowed_types):
        """"""
        for (assoc_type, session_type) in allowed_types:
            checkSessionType(assoc_type, session_type)

        self.allowed_types = allowed_types
955071
function(target){
            if(this.exclude){
                if(target === this.exclude){
                    return false;
                }
                // if exclude is array and target is in it
                if(Object.isArray(this.exclude) && this.exclude.indexOf(target) !== -1){
                    return false;
                }
            }
            if(!this.checkValidType(target)){
                return false;
            }
            if(this.filter && !this.filter(target)){
                return false;
            }

            return true;
        }
265544
def compile(self):
        '''
        
        '''
        self._prune()
        self._resolve_duplicates()
        self._fix_shapes()
        self._infer_all_types()
        self._check_structure()