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

Hyrogen Run not working correctly with if/else statements in python #1341

Closed
mlangiu opened this issue Jun 20, 2018 · 3 comments
Closed

Hyrogen Run not working correctly with if/else statements in python #1341

mlangiu opened this issue Jun 20, 2018 · 3 comments

Comments

@mlangiu
Copy link

mlangiu commented Jun 20, 2018

Pictures say more than words...

When attempting to run the following scenarios (i.e. execute the selected lines by hitting shift + enter) we'l run into some issues:

grafik only runs the if part: grafik
This is unfortunate but could be considered a beauty problem, as
grafik circumvents this issue: grafik

However, within indented sections (where usually this is possible:
grafik -> grafik)
This: grafik will now also fail: grafik

  File "<tokenize>", line 3
    else:
    ^
IndentationError: unindent does not match any outer indentation level

Versions:

OS: Win 10 Enterprise
Atom : 1.27.2
Electron: 1.7.15
Chrome : 58.0.3029.110
Node : 7.9.0

@mbroedl
Copy link

mbroedl commented Jul 22, 2018

You may want to try this package, which takes care of the whitespace problem.
https://atom.io/packages/hydrogen-python

And then you may want to file the if/else behaviour as a feature request to that package, because it's a language specific issue?
#862 #1285

@mlangiu
Copy link
Author

mlangiu commented Jul 26, 2018

@mbroedl: I use that package already, and it doesn't help.
You're probably right that the second part of this issue may be amended by the provider of hydrogen-python, as it seems to be related to leading white space, however, I think the fundamental issue is that executing a basic if/elif/else statement doesn't work. To me it feels like the execution of a basic control structure should be language independent, no?

@kylebarron
Copy link
Contributor

This specific issue should have been fixed from #1363 when selecting indented if/else blocks. For automatic if/else completion, see hydrogen-python.

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

3 participants