You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But that Bash command will always fail. The Python script is indented by 2 spaces; Bash does not itself strip leading whitespace inside the heredoc. So Python will raise an IndentationError when parsing the script:
$ python <<CODE
with open("/path/to/file") as fp:
for line in fp:
if not line.startswith('#'):
print(line.strip())
CODE
File "<stdin>", line 1
with open("/path/to/file") as fp:
IndentationError: unexpected indent
The spec goes on to act as if this command can ever succeed, including by giving example output for the task containing it, which can never be obtained.
The text was updated successfully, but these errors were encountered:
adamnovak
changed the title
The provided correct example for stripping leading whitespace is a Python script that does not run
The provided correct example for stripping leading whitespace is a Python heredoc that does not run
Jun 24, 2024
The 1.1 spec gives this as a correct answer for stripping leading whitespace:
wdl/SPEC.md
Lines 3648 to 3655 in 9c0b9cf
But that Bash command will always fail. The Python script is indented by 2 spaces; Bash does not itself strip leading whitespace inside the heredoc. So Python will raise an
IndentationError
when parsing the script:The spec goes on to act as if this command can ever succeed, including by giving example output for the task containing it, which can never be obtained.
The text was updated successfully, but these errors were encountered: