projects
/
python_utils.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Missed one.
[python_utils.git]
/
histogram.py
diff --git
a/histogram.py
b/histogram.py
index 993b5036d737cdcd705ef411e5cbcf70ba0da911..c673e161a6318fabeb155e1cdb2a2591abe730e0 100644
(file)
--- a/
histogram.py
+++ b/
histogram.py
@@
-1,4
+1,5
@@
#!/usr/bin/env python3
#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
import math
from numbers import Number
import math
from numbers import Number
@@
-85,8
+86,8
@@
class SimpleHistogram(Generic[T]):
return txt
max_label_width: Optional[int] = None
return txt
max_label_width: Optional[int] = None
- lowest_start:
int
= None
- highest_end:
int
= None
+ lowest_start:
Optional[int]
= None
+ highest_end:
Optional[int]
= None
for bucket in sorted(self.buckets, key=lambda x: x[0]):
start = bucket[0]
if lowest_start is None:
for bucket in sorted(self.buckets, key=lambda x: x[0]):
start = bucket[0]
if lowest_start is None:
@@
-100,9
+101,9
@@
class SimpleHistogram(Generic[T]):
max_label_width = label_width
if start == last_bucket_start:
break
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,
sigma_label = f'[{label_formatter}..{label_formatter}): ' % (
lowest_start,