check for makeSource/makeTarget specs.
433640
function (type, idx, defs, matchType) {
					if (_p[type] && !_p[type].endpoint && !_p[type + "Endpoint"] && !_p.newConnection) {
						var tid = _getId(_p[type]), tep = defs[tid];

						tep = tep ? tep[matchType] : null;

						if (tep) {
							// if not enabled, return.
							if (!tep.enabled) return false;
							var newEndpoint = tep.endpoint != null && tep.endpoint._jsPlumb ? tep.endpoint : _addEndpoint(_p[type], tep.def, idx);
							if (newEndpoint.isFull()) return false;
							_p[type + "Endpoint"] = newEndpoint;
							newEndpoint._doNotDeleteOnDetach = false; // reset.
							newEndpoint._deleteOnDetach = true;
							if (tep.uniqueEndpoint) {
								if (!tep.endpoint) {
									tep.endpoint = newEndpoint;
									newEndpoint._deleteOnDetach = false;
									newEndpoint._doNotDeleteOnDetach = true;
								}
								else
									newEndpoint.finalEndpoint = tep.endpoint;
							}
						}
					}
				}
1168741
def getargspec(f):
    """"""
    spec = getfullargspec(f)
    return ArgSpec(spec.args, spec.varargs, spec.varkw, spec.defaults)
810994
def _detect(self):
        
        # Detect all version related pragmas and check if they are disallowed.
        results = []
        pragma = self.slither.pragma_directives
        disallowed_pragmas = []
        detected_version = False
        for p in pragma:
            # Skip any pragma directives which do not refer to version
            if len(p.directive) < 1 or p.directive[0] != "solidity":
                continue

            # This is version, so we test if this is disallowed.
            detected_version = True
            reason = self._check_pragma(p.version)
            if reason:
                disallowed_pragmas.append((reason, p))

        # If we found any disallowed pragmas, we output our findings.
        if disallowed_pragmas:
            info = "Detected issues with version pragma in {}:\n".format(self.filename)
            for (reason, p) in disallowed_pragmas:
                info += "\t- {} ({}): {}\n".format(p, p.source_mapping_str, reason)

            json = self.generate_json_result(info)

            # follow the same format than add_nodes_to_json
            json['elements'] = [{'type': 'expression',
                                 'expression': p.version,
                                 'source_mapping': p.source_mapping} for (reason, p) in disallowed_pragmas]
            results.append(json)

        return results
1006025
def needs_compile(self):
        ''''''
        try:
            source_mtime = os.stat(self.sourcepath).st_mtime
        except OSError:  # no source for this template, so just return
            return False
        try:
            target_mtime = os.stat(self.targetpath).st_mtime
        except OSError: # target doesn't exist, so compile
            return True
        # both source and target exist, so compile if source newer
        return source_mtime > target_mtime
1098271
def check_executable(tool_name):
    """"""
    result = subprocess.call(['which', tool_name], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    if result != 0:
        message = "The executable '%s' cannot be found in your $PATH" % tool_name
        raise Exception(message)
538894
def check(self, spec, data):
        '''
        '''
        path_eval = self.path_eval
        for keypath, specvalue in spec.items():
            if keypath.startswith('$'):
                optext = keypath
                checkable = data
                args = (optext, specvalue, checkable)
                generator = self.dispatch_operator(*args)
            else:
                try:
                    checkable = path_eval(data, keypath)
                except self.InvalidPath:
                    # The spec referenced an item or attribute that
                    # doesn't exist. Fail!
                    return False
                generator = self.dispatch_literal(specvalue, checkable)
            for result in generator:
                if not result:
                    return False
        return True
880180
function checkThatExecutableExists(next) {
        fs.exists(nodeCompiler.releasePath, function(exists) {
          if (!exists) {
            _log(
              'error',
              'The release executable has not been generated. ' +
                'This indicates a failure in the build process. ' +
                'There is likely additional information above.',
            );
            process.exit(1);
          } else {
            next();
          }
        });
      }
308514
def check_executables():
    """"""
    print("\033[1mCheck executables\033[0m")
    required_executables = [utils.get_nntoolkit()]
    for executable in required_executables:
        path = which(executable)
        if path is None:
            print("%s ... %sNOT%s found" % (executable, Bcolors.WARNING,
                                            Bcolors.ENDC))
        else:
            print("%s ... %sfound%s at %s" % (executable, Bcolors.OKGREEN,
                                              Bcolors.ENDC, path))
1156670
def assert_requirements(self):
        """""""

        # Support for 508's implementation_version.
        if hasattr(sys, 'implementation'):
            implementation_version = format_full_version(sys.implementation.version)
        else:
            implementation_version = "0"

        # Default to cpython for 2.7.
        if hasattr(sys, 'implementation'):
            implementation_name = sys.implementation.name
        else:
            implementation_name = 'cpython'

        lookup = {
            'os_name': os.name,
            'sys_platform': sys.platform,
            'platform_machine': platform.machine(),
            'platform_python_implementation': platform.python_implementation(),
            'platform_release': platform.release(),
            'platform_system': platform.system(),
            'platform_version': platform.version(),
            'python_version': platform.python_version()[:3],
            'python_full_version': platform.python_version(),
            'implementation_name': implementation_name,
            'implementation_version': implementation_version
        }

        # Assert each specified requirement.
        for marker, specifier in self.data['_meta']['requires'].items():

            if marker in lookup:
                try:
                    assert lookup[marker] == specifier
                except AssertionError:
                    raise AssertionError('Specifier {!r} does not match {!r}.'.format(marker, specifier))
926808
def check_version(ctx, param, value):
    """"""
    if ctx.resilient_parsing:
        return

    if not value and ctx.invoked_subcommand != 'run':
        ctx.call_on_close(_check_version)
189842
function checkProjectCompilations(project) {
	return waitForCompletion(project)
	.then(() => {
		for (const platform in project.compilations) {
			if (!project.compilations.hasOwnProperty(platform)) {
				continue;
			}
			const compilation = project.compilations[platform];
			if (compilation.isReady()) {
				console.info(compilation.platform + " compilation from " + project.name + " project: " + project.id + " is completed.");
			} else if (compilation.isErred()) {
				console.error(compilation.platform + " compilation from " + project.name + " project: " + project.id + " is erred.");
				console.error("ERROR LOG of the " + compilation.platform + " platform:");
				console.error(compilation.error);
			} else {
				console.error(compilation.platform + " compilation from " + project.name + " project: " + project.id +
					" was ignored. Status: " + compilation.status + ".");
			}
		}
		return undefined;
	})
	.catch((error) => {
		console.trace(error);
		throw error;
	});
}
669950
def check_build_layout(self):
        '''
        '''
        self.info('Ensure build layout')

        if not exists(self.specfilename):
            print('No {0} found in the current directory. Abandon.'.format(
                self.specfilename))
            exit(1)

        # create global dir
        self.mkdir(self.global_buildozer_dir)
        self.mkdir(self.global_cache_dir)

        # create local .buildozer/ dir
        self.mkdir(self.buildozer_dir)
        # create local bin/ dir
        self.mkdir(self.bin_dir)

        self.mkdir(self.applibs_dir)
        self.state = JsonStore(join(self.buildozer_dir, 'state.db'))

        target = self.targetname
        if target:
            self.mkdir(join(self.global_platform_dir, target, 'platform'))
            self.mkdir(join(self.buildozer_dir, target, 'platform'))
            self.mkdir(join(self.buildozer_dir, target, 'app'))
613555
public static void verifyTargets(
			ITargetHandlerResolver targetHandlerResolver,
			ManagedApplication ma,
			ITargetsMngr targetsMngr ) {

		Logger logger = Logger.getLogger( TargetHelpers.class.getName());
		for( Instance inst : InstanceHelpers.getAllInstances( ma.getApplication())) {
			if( ! InstanceHelpers.isTarget( inst ))
				continue;

			try {
				String path = InstanceHelpers.computeInstancePath( inst );
				Map<String,String> targetProperties = targetsMngr.findTargetProperties( ma.getApplication(), path ).asMap();
				targetHandlerResolver.findTargetHandler( targetProperties );

			} catch( TargetException e ) {
				logger.warning( e.getMessage());
			}
		}
	}
1195261
def validate_pypi_opts(opt_parser):
    

    (options, remaining_args) = opt_parser.parse_args()
    options_pkg_specs = [ options.versions_available,
            options.query_metadata_pypi,
            options.show_download_links,
            options.browse_website,
            options.fetch,
            options.show_deps,
            ]
    for pkg_spec in options_pkg_specs:
        if pkg_spec:
            return pkg_spec
1332452
def process_compile_entries(
        processor, spec, entries, modpath_logger=None, targetpath_logger=None):
    

    # Contains a mapping of the module name to the compiled file's
    # relative path starting from the base build_dir.
    all_modpaths = {}
    all_targets = {}
    # List of exported module names, should be equal to all keys of
    # the compiled and bundled sources.
    all_export_module_names = []

    def update(base, fresh, logger):
        if callable(logger):
            for dupes in dict_update_overwrite_check(base, fresh):
                logger(*dupes)
        else:
            base.update(fresh)

    for entry in entries:
        modpaths, targetpaths, export_module_names = processor(spec, entry)
        update(all_modpaths, modpaths, modpath_logger)
        update(all_targets, targetpaths, targetpath_logger)
        all_export_module_names.extend(export_module_names)

    return all_modpaths, all_targets, all_export_module_names
1001765
def verify_builder(builder):
    

    try:
        d = getcallargs(builder, package_names=[], export_target='some_path')
    except TypeError:
        return False
    return d == {'package_names': [], 'export_target': 'some_path'}
1033062
def transpile_modname_source_target(self, spec, modname, source, target):
        

        return self.simple_transpile_modname_source_target(
            spec, modname, source, target)