mirror of https://gitlab.com/bashrc2/epicyon
Comment
parent
640fc95ad0
commit
5bc7a337a0
|
@ -71,7 +71,9 @@ from socnet import instancesGraph
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
|
|
||||||
def str2bool(v):
|
def str2bool(v) -> bool:
|
||||||
|
"""Returns true if the given value is a boolean
|
||||||
|
"""
|
||||||
if isinstance(v, bool):
|
if isinstance(v, bool):
|
||||||
return v
|
return v
|
||||||
if v.lower() in ('yes', 'true', 't', 'y', '1'):
|
if v.lower() in ('yes', 'true', 't', 'y', '1'):
|
||||||
|
|
Loading…
Reference in New Issue