Skip to content

formatOnType strips spaces in slices where : acts like a binary operator #1792

@brettcannon

Description

@brettcannon
ham[lower+offset : upper+offset]
ham[:upper_fn(x) : step_fn(x)], ham[:: step_fn(x)]
ham[lower + offset : upper + offset]

becomes:

ham[lower + offset:upper + offset]
ham[:upper_fn(x):step_fn(x)], ham[::step_fn(x)]
ham[lower + offset:upper + offset]

Taken from PEP 8 in it's "pet peeves" section.

Metadata

Metadata

Assignees

Labels

area-formattingbugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions