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

Keywords: run, onerror, onsuccess, onstart should create new context #14

Open
iromeo opened this issue Jan 11, 2019 · 7 comments
Open
Labels
codeInsight Code completion, resolve depends on other issue inspections Code inspections parsing Parser Errors
Milestone

Comments

@iromeo
Copy link
Contributor

iromeo commented Jan 11, 2019

run, onerror,onsuccess, onstart should create new context

@iromeo iromeo added the parsing Parser Errors label Jan 11, 2019
@iromeo iromeo self-assigned this Jan 11, 2019
@iromeo iromeo changed the title run, onerror,onsuccess, onstart should create new context Keywords: run, onerror, onsuccess, onstart should create new context Jan 11, 2019
@flying-sheep
Copy link

A function context to be precise, so that return isn’t flagged as syntax error

@iromeo
Copy link
Contributor Author

iromeo commented Jan 18, 2019

@flying-sheep By the way what is return semantics here? The rule fails if run returns False?

@flying-sheep
Copy link

no idea! but if you return without creating the files you said you would, won’t snakemake catch that anyway?

@iromeo
Copy link
Contributor Author

iromeo commented Jul 4, 2019

Current behaviour:
'return' outside of function error in all 5 cases:
image

@iromeo
Copy link
Contributor Author

iromeo commented Jul 4, 2019

Now now error on return statements, but python control flow isn't snakemake aware and thus gives false positive unreachable code errors
image

@iromeo
Copy link
Contributor Author

iromeo commented Jul 9, 2019

@iromeo
Copy link
Contributor Author

iromeo commented Jul 9, 2019

Seems #101 not needed if control flow builder works ok, should smth like 'unbound local variable' exception. Or #101 could be reimplemented using control flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codeInsight Code completion, resolve depends on other issue inspections Code inspections parsing Parser Errors
Projects
None yet
Development

No branches or pull requests

2 participants