From de1928364ded5a633ce84690d5d8f8f8328c01e6 Mon Sep 17 00:00:00 2001 From: david_wobrock Date: Wed, 5 Jul 2017 16:36:00 +0200 Subject: [PATCH] Exclude __init__ files from linting --- migration_linter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration_linter.py b/migration_linter.py index e25eeb4..f1d7674 100644 --- a/migration_linter.py +++ b/migration_linter.py @@ -72,7 +72,7 @@ class MigrationLinter: diff_process = Popen(git_diff_command, shell=True, stdout=PIPE, stderr=PIPE) for line in diff_process.stdout.readlines(): # Only gather lines that include migrations - if re.search('\/{0}\/.*\.py'.format(self.MIGRATION_FOLDER_NAME), line): + if re.search('\/{0}\/.*\.py'.format(self.MIGRATION_FOLDER_NAME), line) and '__init__' not in line: self.changed_migration_files.append(line.strip()) diff_process.wait() if diff_process.returncode != 0: