"""
@abstractmethod
- def _resolve(self) -> T:
+ def _resolve(self, timeout=None) -> T:
pass
@staticmethod
if not is_ip_v4(txt):
print(f"not IP: {txt}")
return None
- return tuple([int(x) for x in txt.split('.')])
+ return tuple(int(x) for x in txt.split('.'))
def path_ancestors_before_descendants_sort_key(volume: str) -> Tuple[str, ...]:
['/usr', '/usr/local', '/usr/local/bin']
"""
- return tuple([x for x in volume.split('/') if len(x) > 0])
+ return tuple(x for x in volume.split('/') if len(x) > 0)
def replace_all(in_str: str, replace_set: str, replacement: str) -> str:
include_text=True,
width=70,
fgcolor=fg("school bus yellow"),
- reset=reset(),
+ reset_seq=reset(),
left_end="[",
right_end="]",
) -> str:
"""Returns a string containing a bar graph.
- >>> bar_graph(0.5, fgcolor='', reset='')
+ >>> bar_graph(0.5, fgcolor='', reset_seq='')
'[███████████████████████████████████ ] 50.0%'
"""
+ "█" * whole_width
+ part_char
+ " " * (width - whole_width - 1)
- + reset
+ + reset_seq
+ right_end
+ " "
+ text