prettier / plugin-python

Prettier Python Plugin
MIT License
517 stars 41 forks source link

Improve raise printing #66

Closed patrick91 closed 6 years ago

patrick91 commented 6 years ago

Needs fix

patrick91 commented 6 years ago

@FuegoFro not entirely convinced by how it formats this:

raise forms.ValidationError(
    self.error_messages['invalid_login'],
    code='invalid_login',
    params={
        'username': self.username_field.verbose_name
    }
)

to this:

raise (
    forms.ValidationError(self.error_messages[
        "invalid_login"
    ], code="invalid_login", params={
        "username": self.username_field.verbose_name
    })
)

but I think we can merge it and improve it later :)

patrick91 commented 6 years ago

@FuegoFro updates done, this should be good to merge now :)