Skip to main content

SeparatedPathType

Click option type that accepts a list of values separated by the OS's path separator (:, ; on Windows). Each value is validated as a :class:click.Path type.

Methods


convert()

@classmethod
def convert(
value: t.Any,
param: click.Parameter | None,
ctx: click.Context | None
) - > t.Any

Converts a string value, potentially containing multiple path items separated by the OS path separator, into a list of validated path strings. This method is used by Click to process command-line arguments that represent multiple file paths.

Parameters

NameTypeDescription
valuet.AnyThe input string value to convert, which may contain multiple path items.
param`click.ParameterNone`
ctx`click.ContextNone`

Returns

TypeDescription
t.AnyA list of validated path strings.