MCPcopy Create free account
hub / github.com/NVlabs/SPADE / str2bool

Function str2bool

util/util.py:171–177  ·  view source on GitHub ↗
(v)

Source from the content-addressed store, hash-verified

169
170
171def str2bool(v):
172 if v.lower() in ('yes', 'true', 't', 'y', '1'):
173 return True
174 elif v.lower() in ('no', 'false', 'f', 'n', '0'):
175 return False
176 else:
177 raise argparse.ArgumentTypeError('Boolean value expected.')
178
179
180def find_class_in_module(target_cls_name, module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected