PyCharm incorrectly formats comments in multiline type hint

PyCharm incorrectly formats comments in multiline type hint.

You can use this public code snippet to try (screenshot below):

https://github.com/argrelay/argrelay/blob/v0.8.0.final/src/argrelay/runtime_context/ParsedContext.py#L69-L89

Comments are not highlighted as comments - but that is a minor issue.

The worst thing is that auto-formatting applies wrong rules.
And it is also inconsistent.
See the first line # all_tokens is not indented but the other # comment lines are:

0

Please sign in to leave a comment.