mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
fix failing test in util.selector.format with imperial_length
the error is below, not sure how I haven't noticed it before 🤔
assert subject.format('imperial_length(1, 1)') == "1'"
> raise VisitError(tree.data, tree, e)
E lark.exceptions.VisitError: Error trying to process rule "imperial_length":
E
E cannot access local variable 'output_unit' where it is not associated with a value
This commit is contained in:
@@ -233,7 +233,7 @@ class FormatTransformer(lark.Transformer):
|
||||
|
||||
def imperial_length(self, args):
|
||||
if len(args) == 2:
|
||||
input_unit = "foot"
|
||||
input_unit, output_unit = "foot", "foot"
|
||||
value, precision = args
|
||||
else:
|
||||
value, precision, input_unit, output_unit = args
|
||||
|
||||
Reference in New Issue
Block a user