Skip to content
This repository was archived by the owner on Oct 1, 2019. It is now read-only.

tokenizing errors #111

Open
ranshamay opened this issue Oct 21, 2018 · 0 comments
Open

tokenizing errors #111

ranshamay opened this issue Oct 21, 2018 · 0 comments

Comments

@ranshamay
Copy link

ranshamay commented Oct 21, 2018

hi guys, great work!
i just ran the prettier on one of my projects and i got some bugs,

all of the above happen in python 2.7
1.on slice notation, its not detecting the parenthesis,
for example,
before prettier:
some_var[1:]
after prettier:
some_var[1]
2.on not clause, not token will concatenate to the next token,
before prettier:
if not is_something:
do_something()
after prettier:
if notis_something:
do_something()
3.function signature with default values and splitted to few lines doesnt work well:
before prettier:
def init(self, db_mail_info=None,
email_sent_time=None):
after prettier:
def init(self, db_mail_info, email_sent_time=None, ):
4. mixed and or statement removes parenthesis so the logic is changing:
before prettier:
if x and (y or z):
do_something()
after prettier:
if x and y or z:
do_something()

thanks!

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

No branches or pull requests

1 participant