wsp-sag / Lasso

Python package of utilities for Network Wrangler
https://wsp-sag.github.io/Lasso/
Apache License 2.0
5 stars 3 forks source link

Parse Transformer returning a tuple rather than dict #106

Closed e-lo closed 4 years ago

e-lo commented 4 years ago

CubeTransformer().transform(parse_tree) is returning a singleton tuple.

Expecting a dict.

cc: Issue found by @DavidOry

e-lo commented 4 years ago

Issue because it will return a tuple if it finds the program type line, and a plain dictionary if not. Can be fixed by checking type first. Standby.

TRANSIT_LINE_FILE_GRAMMAR = r"""
?start             : program_type_line? lines