1. Prometheus Research, LLC
  2. Prometheus
  3. htsql

Commits

Kirill Simonov  committed eee878c

htsql-ctl shell: allow non-indented comments in multi-line queries.

  • Participants
  • Parent commits bbaaa48
  • Branches default

Comments (0)

Files changed (1)

File src/htsql/ctl/shell.py

View file
  • Ignore whitespace
         blocks = []
         lines = []
         for line in stream:
-            if not line.strip():
+            if not line.strip() or line.startswith('#'):
                 if lines:
                     lines.append(line)
-            elif line.startswith('#'):
-                if lines:
-                    blocks.append(lines)
-                lines = []
             elif line == line.lstrip():
                 if lines:
                     blocks.append(lines)