roboto.paths#

Module Contents#

roboto.paths.excludespec_from_patterns(exclude_patterns=None)#

Transform a list of Git wildmatch patterns into a pathspec.PathSpec.

Parameters:

exclude_patterns (Optional[collections.abc.Iterable[str]])

Return type:

Optional[pathspec.PathSpec]

roboto.paths.path_matches(path, include_patterns=None, exclude_patterns=None)#

Does the given path match the given include pattern(s) and not match the given exclude pattern(s)?

Parameters:
  • path (str)

  • include_patterns (Optional[collections.abc.Iterable[str]])

  • exclude_patterns (Optional[collections.abc.Iterable[str]])

Return type:

bool

roboto.paths.path_to_pattern(path)#

Transform a literal path into a Git wildmatch pattern that matches that literal path.

Parameters:

path (str)

Return type:

str

roboto.paths.pathspec_from_patterns(patterns)#

Transform a list of Git wildmatch patterns into a pathspec.PathSpec.

Parameters:

patterns (collections.abc.Iterable[str])

Return type:

pathspec.PathSpec

roboto.paths.pattern_to_like_value(pattern)#
Parameters:

pattern (str)

Return type:

str

roboto.paths.patterns_to_condition_group(patterns, path_field_name, comparator, operator)#

Transform a list of Git wildmatch patterns into a ConditionGroup.

Parameters:
Return type:

roboto.query.ConditionGroup