MCPcopy Index your code
hub / github.com/microsoft/SandDance / ensure_targets

Function ensure_targets

python/jupyter-widget/setupbase.py:382–399  ·  view source on GitHub ↗

Return a Command that checks that certain files exist. Raises a ValueError if any of the files are missing. Note: The check is skipped if the `--skip-npm` flag is used.

(targets)

Source from the content-addressed store, hash-verified

380
381
382def ensure_targets(targets):
383 """Return a Command that checks that certain files exist.
384
385 Raises a ValueError if any of the files are missing.
386
387 Note: The check is skipped if the `--skip-npm` flag is used.
388 """
389
390 class TargetsCheck(BaseCommand):
391 def run(self):
392 if skip_npm:
393 log.info('Skipping target checks')
394 return
395 missing = [t for t in targets if not os.path.exists(t)]
396 if missing:
397 raise ValueError(('missing files: %s' % missing))
398
399 return TargetsCheck
400
401
402# `shutils.which` function copied verbatim from the Python-3.3 source.

Callers 1

setup.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected