Add doctest to misc_utils.
[python_utils.git] / histogram.py
index d45e93f328185f869c2b3af4cc832db280d14428..c673e161a6318fabeb155e1cdb2a2591abe730e0 100644 (file)
@@ -1,4 +1,5 @@
 #!/usr/bin/env python3
+# -*- coding: utf-8 -*-
 
 import math
 from numbers import Number
@@ -100,9 +101,9 @@ class SimpleHistogram(Generic[T]):
                 max_label_width = label_width
             if start == last_bucket_start:
                 break
-        assert max_label_width
-        assert lowest_start
-        assert highest_end
+        assert max_label_width is not None
+        assert lowest_start is not None
+        assert highest_end is not None
 
         sigma_label = f'[{label_formatter}..{label_formatter}): ' % (
             lowest_start,