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

Function _get_package_data

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

Expand file patterns to a list of `package_data` paths. Parameters ----------- root: str The relative path to the package root from `HERE`. file_patterns: list or str, optional A list of glob patterns for the data file locations. The globs can be recursive if

(root, file_patterns=None)

Source from the content-addressed store, hash-verified

598
599
600def _get_package_data(root, file_patterns=None):
601 """Expand file patterns to a list of `package_data` paths.
602
603 Parameters
604 -----------
605 root: str
606 The relative path to the package root from `HERE`.
607 file_patterns: list or str, optional
608 A list of glob patterns for the data file locations.
609 The globs can be recursive if they include a `**`.
610 They should be relative paths from the root or
611 absolute paths. If not given, all files will be used.
612
613 Note:
614 Files in `node_modules` are ignored.
615 """
616 if file_patterns is None:
617 file_patterns = ['*']
618 return _get_files(file_patterns, _glob_pjoin(HERE, root))
619
620
621def _compile_pattern(pat, ignore_case=True):

Callers 1

runMethod · 0.85

Calls 2

_get_filesFunction · 0.85
_glob_pjoinFunction · 0.85

Tested by

no test coverage detected