1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[4.1.x] Fixed #34085 -- Made management commands don't use black for non-Python files.

Bug in d113b5a837.

Co-authored-by: programmylife <acmshar@gmail.com>
Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>

Backport of 5c2c7277d4 from main.
This commit is contained in:
Carlton Gibson
2022-10-18 10:30:35 -07:00
committed by Mariusz Felisiak
parent 202f5ae96a
commit 84814412a0
4 changed files with 26 additions and 4 deletions

View File

@@ -80,7 +80,6 @@ class TemplateCommand(BaseCommand):
)
def handle(self, app_or_project, name, target=None, **options):
self.written_files = []
self.app_or_project = app_or_project
self.a_or_an = "an" if app_or_project == "app" else "a"
self.paths_to_remove = []
@@ -201,7 +200,6 @@ class TemplateCommand(BaseCommand):
else:
shutil.copyfile(old_path, new_path)
self.written_files.append(new_path)
if self.verbosity >= 2:
self.stdout.write("Creating %s" % new_path)
try:
@@ -224,7 +222,7 @@ class TemplateCommand(BaseCommand):
else:
shutil.rmtree(path_to_remove)
run_formatters(self.written_files)
run_formatters([top_dir])
def handle_template(self, template, subdir):
"""