diff --git a/git_pylint_commit_hook/commit_hook.py b/git_pylint_commit_hook/commit_hook.py index a679495..ea0f7ee 100644 --- a/git_pylint_commit_hook/commit_hook.py +++ b/git_pylint_commit_hook/commit_hook.py @@ -223,8 +223,8 @@ def check_repo( # Find Python files for filename in _get_list_of_committed_files(): try: - if _is_python_file(filename) and \ - not _is_ignored(filename, ignored_files): + if not _is_ignored(filename, ignored_files) and \ + _is_python_file(filename): python_files.append((filename, None)) except IOError: print('File not found (probably deleted): {}\t\tSKIPPED'.format(