Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting of e.g. OrderedDict is off #4

Open
alimony opened this issue Aug 20, 2020 · 1 comment
Open

Formatting of e.g. OrderedDict is off #4

alimony opened this issue Aug 20, 2020 · 1 comment

Comments

@alimony
Copy link
Contributor

alimony commented Aug 20, 2020

When formatting the following:

OrderedDict([('foo', 1), ('bar', 'baz')])

I get this:

OrderedDict ([
('foo',
    1 ),
    ('bar',
    'baz')
])

while I would rather get this:

OrderedDict([
    ('foo', 1),
    ('bar', 'baz')
])

Except general formatting, also note no space after OrderedDict or 1.

@Tenzer
Copy link
Owner

Tenzer commented Aug 20, 2020

I haven't made any changes to this project for years since it's been working "good enough" for me, and helps with getting a dense Python dict into a more readable format easily.
Since this was made Black has become a thing. It might work better for this use case as it parses the code better than my quick work does.

That said, if you are up for making a pull request to improve the formatting of this plugin, then I'd be happy to consider it. I've generally tried to keep the formatting rather generic and not add (m)any special cases, so I'd appreciate if it could be done in a similar way - if possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants