Skip to content

Commit

Permalink
Fixed unused variable looking for (PI) in expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregwar committed Apr 18, 2024
1 parent 031b5e7 commit 7f6e893
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions onshape_to_robot/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ def readExpression(expression):
# looking for PI
if isinstance(parts[0], str):
if parts[0] == '(PI)':
val = math.pi
value = math.pi
else:
raise ValueError(f"{parts[0]} variable isn't supported")
else:
val = parts[0]
return float(parts[0])
value = parts[0]
return float(value)
elif parts[1] == 'mm':
return float(parts[0])/1000.0
elif parts[1] == 'cm':
Expand Down

0 comments on commit 7f6e893

Please sign in to comment.