|
2 | 2 |
|
3 | 3 | __all__ = ['dict2obj', 'obj2dict', 'repr_dict', 'is_listy', 'shufflish', 'mapped', 'IterLen', 'ReindexCollection', |
4 | 4 | 'maybe_open', 'image_size', 'bunzip', 'join_path_file', 'loads', 'loads_multi', 'untar_dir', 'repo_details', |
5 | | - 'run', 'open_file', 'save_pickle', 'load_pickle', 'truncstr', 'spark_chars', 'ceil', 'sparkline', |
6 | | - 'autostart', 'EventTimer', 'stringfmt_names', 'PartialFormatter', 'partial_format', 'utc2local', 'local2utc', |
7 | | - 'trace', 'round_multiple', 'modified_env', 'ContextManagers', 'str2bool', 'sort_by_run'] |
| 5 | + 'run', 'open_file', 'save_pickle', 'load_pickle', 'truncstr', 'spark_chars', 'sparkline', 'autostart', |
| 6 | + 'EventTimer', 'stringfmt_names', 'PartialFormatter', 'partial_format', 'utc2local', 'local2utc', 'trace', |
| 7 | + 'round_multiple', 'modified_env', 'ContextManagers', 'str2bool', 'sort_by_run'] |
8 | 8 |
|
9 | 9 | # Cell |
10 | 10 | from .imports import * |
@@ -242,12 +242,12 @@ def truncstr(s:str, maxlen:int, suf:str='…', space='')->str: |
242 | 242 | spark_chars = '▁▂▃▅▆▇' |
243 | 243 |
|
244 | 244 | # Cell |
245 | | -def ceil(x, lim=None): return x if (not lim or x <= lim) else lim |
| 245 | +def _ceil(x, lim=None): return x if (not lim or x <= lim) else lim |
246 | 246 |
|
247 | 247 | def _sparkchar(x, mn, mx, incr, empty_zero): |
248 | 248 | if x is None or (empty_zero and not x): return ' ' |
249 | 249 | if incr == 0: return spark_chars[0] |
250 | | - res = int((ceil(x,mx)-mn)/incr-0.5) |
| 250 | + res = int((_ceil(x,mx)-mn)/incr-0.5) |
251 | 251 | return spark_chars[res] |
252 | 252 |
|
253 | 253 | # Cell |
|
0 commit comments