plugin-python icon indicating copy to clipboard operation
plugin-python copied to clipboard

Unnatural formatting of dict/list dict values

Open jleclanche opened this issue 7 years ago • 2 comments

Input:

TEMPLATES = [{
	"BACKEND": "django.template.backends.django.DjangoTemplates",
	"DIRS": [
		"/some/path/to/some/example/directory",
	],
	"APP_DIRS": True,
	"OPTIONS": {
		"context_processors": [
			"django.template.context_processors.debug",
			"django.template.context_processors.request",
			"django.contrib.auth.context_processors.auth",
			"django.contrib.messages.context_processors.messages",
		],
	},
}]

Output:

TEMPLATES = [
	{
		"BACKEND": "django.template.backends.django.DjangoTemplates",
		"DIRS": ["/some/path/to/some/example/directory"],
		"APP_DIRS": True,
		"OPTIONS":
			{
				"context_processors":
					[
						"django.template.context_processors.debug",
						"django.template.context_processors.request",
						"django.contrib.auth.context_processors.auth",
						"django.contrib.messages.context_processors.messages",
					],
			},
	},
]

I don't know anyone who formats dict values like this and it feels very unnatural.

jleclanche avatar Mar 16 '18 00:03 jleclanche

Looks like this might be addressed some by #52

jleclanche avatar Mar 16 '18 01:03 jleclanche

It looks like #52 won't actually resolve this issue, but it should be fairly trivial to resolve this once #52 lands. I don't want to add it to that PR since that PR is big enough as is :/ But I will go ping that PR;)

FuegoFro avatar Mar 22 '18 05:03 FuegoFro