@@ -163,9 +163,9 @@ class Task(db.Model):
163163 ) # user relationship
164164
165165
166- @app .template_filter ("short_numeric" ) # short numeric filter
166+ @app .template_filter ("short_numeric" ) # short numeric format filter
167167def short_numeric_filter (
168- value : Union [int , float ]
168+ value : Union [int , float ],
169169) -> str : # get number in short numeric form with abbreviations
170170 """
171171 Get the abbreviated numeric value.
@@ -202,18 +202,18 @@ def short_numeric_filter(
202202 exponent += 1
203203 return (
204204 f"{ mantissa :.3g} { units [exponent ]} " if value >= 1000 else f"{ value :.0f} "
205- ) # print abbreviated output
205+ ) # print abbreviated numeric output
206206
207207
208208app .jinja_env .filters ["short_numeric" ] = (
209- short_numeric_filter # add short numeric filter to Jinja
209+ short_numeric_filter # add short numeric format filter to Jinja
210210)
211211
212212
213213# round number with commas filter
214214@app .template_filter ("round_number_with_commas" )
215215def round_number_with_commas_filter (
216- value : Union [int , float ]
216+ value : Union [int , float ],
217217) -> str : # round number with commas
218218 return f"{ round (value ):,} "
219219
0 commit comments