Skip to content

Commit

Permalink
[change-precision] fail on untyped column #2523
Browse files Browse the repository at this point in the history
  • Loading branch information
saulpw committed Oct 1, 2024
1 parent a62b520 commit 1af5fcd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions visidata/features/change_precision.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ def setcol_precision(col, amount:int):
if not precision_str is None:
col.fmtstr = f'%.{max(0, int(precision_str[1]) + amount)}f'
else:
col.type = float
if col.fmtstr == '':
col.fmtstr = '%.2f'
vd.fail('column type must be numeric or date')


vd.addMenuItems('''
Expand Down

0 comments on commit 1af5fcd

Please sign in to comment.