Skip to content
This repository has been archived by the owner. 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 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.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.