Exclude __init__ files from linting
This commit is contained in:
1 parent
8af5bdb252
commit
de1928364d
1 file changed
+1
-1
+1
-1
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user