def kind_from_path(path: Path, base: bool=False) -> FileType:
    "Determine the file kind based on its name.\n\n    When called with base=True, it will return the base file type instead\n    of the explicit one. That is expected to return 'yaml' for any yaml files.\n    "
    pathex = wcmatch.pathlib.PurePath(path.absolute().resolve())
    kinds = (options.kinds if (not base) else BASE_KINDS)
    for entry in kinds:
        for (k, v) in entry.items():
            if pathex.globmatch(v, flags=((wcmatch.pathlib.GLOBSTAR | wcmatch.pathlib.BRACE) | wcmatch.pathlib.DOTGLOB)):
                return str(k)
    if base:
        return ''
    if path.is_dir():
        return 'role'
    if (str(path) == '/dev/stdin'):
        return 'playbook'
    return ''
Determine the file kind based on its name.

When called with base=True, it will return the base file type instead
of the explicit one. That is expected to return 'yaml' for any yaml files.
def kind_from_path(path: Path, base: bool=False) -> FileType:
    "Determine the file kind based on its name.\n\n    When called with base=True, it will return the base file type instead\n    of the explicit one. That is expected to return 'yaml' for any yaml files.\n    "
    pathex = wcmatch.pathlib.PurePath(path.absolute().resolve())
    kinds = (options.kinds if (not base) else BASE_KINDS)
    for entry in kinds:
        for (k, v) in entry.items():
            if pathex.globmatch(v, flags=((wcmatch.pathlib.GLOBSTAR | wcmatch.pathlib.BRACE) | wcmatch.pathlib.DOTGLOB)):
                return str(k)
    if base:
        return 
    if path.is_dir():
        return 'role'
    if (str(path) == '/dev/stdin'):
        return 'playbook'
    return 