def discover_lintables(options: Namespace) -> Dict[(str, Any)]:
    'Find all files that we know how to lint.'
    git_command = ['git', 'ls-files', '-z']
    out = None
    try:
        out = subprocess.check_output(git_command, stderr=subprocess.STDOUT, universal_newlines=True).split('\x00')[:(- 1)]
        _logger.info('Discovered files to lint using: %s', ' '.join(git_command))
    except subprocess.CalledProcessError as exc:
        if (not ((exc.returncode == 128) and ('fatal: not a git repository' in exc.output))):
            _logger.warning('Failed to discover lintable files using git: %s', exc.output.rstrip('\n'))
    except FileNotFoundError as exc:
        if options.verbosity:
            _logger.warning('Failed to locate command: %s', exc)
    if (out is None):
        exclude_pattern = '|'.join(options.exclude_paths)
        _logger.info('Looking up for files, excluding %s ...', exclude_pattern)
        out = WcMatch('.', exclude_pattern=exclude_pattern, flags=RECURSIVE).match()
    return OrderedDict.fromkeys(sorted(out))
Find all files that we know how to lint.
def discover_lintables(options: Namespace) -> Dict[(str, Any)]:
    
    git_command = ['git', 'ls-files', '-z']
    out = None
    try:
        out = subprocess.check_output(git_command, stderr=subprocess.STDOUT, universal_newlines=True).split('\x00')[:(- 1)]
        _logger.info('Discovered files to lint using: %s', ' '.join(git_command))
    except subprocess.CalledProcessError as exc:
        if (not ((exc.returncode == 128) and ('fatal: not a git repository' in exc.output))):
            _logger.warning('Failed to discover lintable files using git: %s', exc.output.rstrip('\n'))
    except FileNotFoundError as exc:
        if options.verbosity:
            _logger.warning('Failed to locate command: %s', exc)
    if (out is None):
        exclude_pattern = '|'.join(options.exclude_paths)
        _logger.info('Looking up for files, excluding %s ...', exclude_pattern)
        out = WcMatch('.', exclude_pattern=exclude_pattern, flags=RECURSIVE).match()
    return OrderedDict.fromkeys(sorted(out))