Is it possible to set Align key-value pair in Pycharm Code Style? I'm looking for something that will reformat:
nickname = models.CharField(unique=True, max_length=24)
biography = models.TextField(default=BIO_DEFAULT_STRING)
avatar = models.ImageField(upload_to='members/avatars/')
to:
nickname = models.CharField(unique=True, max_length=24)
biography = models.TextField(default=BIO_DEFAULT_STRING)
avatar = models.ImageField(upload_to='members/avatars/')
I got it working in PhpStorm, can't find it in PyCharm.
It is really strange, but PyCharm 2016 has this stuff, and i was to search the way to turn it OFF. I found this question, while searching "How to turn align by value".
File - Settings - Editor - Code Style - Python
There you need Other tab, where you'll find Dict Aligment settings. There is 3 types:
Here is a screenshot
Have no idea why they added that stuff, maybe because of platform unification, but it is exist and was turned to
'Align on value'
by default for me after i've updeted PyCharm to 2016.2.UPDATE:
A litle bit more explanations:
It was asked how to make aligns in PyCharm code formating, for example in dicts.:
Here how does dict should looks like via PEP:
That's how does it looks for me in PyCharm after platform update (and such format DO NOT match PEP, but it can be done by PyCharm settings:
It was aligned by values. And the question was about "How to align key:values in PyCharm"