# Path: bom/utils.py
# def strip_trailing_zeros(num):
#     found = False
#     for c in num:
#         if c.isdigit():
#             found = True
#         elif c not in ['-', '+', '.']:
#             found = False
#             break
#     return ('%f' % float(num)).rstrip('0').rstrip('.') if found else num


from django.db import migrations, models
from bom.utils import strip_trailing_zeros
import django.utils.timezone
# Generated by Django 2.2.7 on 2019-12-14 13:42



def synopsis(pr, make_searchable=False):
    self = pr
    def verbosify(val, units=None, pre=None, pre_whitespace=True, post=None, post_whitespace=True):
        elaborated = ""

        if val is not None and val != '':
            try:

# Path: bom/utils.py
# def strip_trailing_zeros(num):
#     found = False
#     for c in num:
#         if c.isdigit():
#             found = True
#         elif c not in ['-', '+', '.']:
#             found = False
#             break
#     return ('%f' % float(num)).rstrip('0').rstrip('.') if found else num


# Path: bom/migrations/0024_auto_20191214_1342.py
from django.db import migrations, models
from bom.utils import strip_trailing_zeros
import django.utils.timezone

# Generated by Django 2.2.7 on 2019-12-14 13:42



def synopsis(pr, make_searchable=False):
    self = pr
    def verbosify(val, units=None, pre=None, pre_whitespace=True, post=None, post_whitespace=True):
        elaborated = ""

        if val is not None and val != '':
            try:

                elaborated = strip_trailing_zeros(str(val))