MCPcopy Create free account
hub / github.com/AtlasAnalyticsLab/AdaFisher / smart_string_to_int

Function smart_string_to_int

Image_Classification/src/utils/utils.py:13–20  ·  view source on GitHub ↗
(
        string: str,
        e: str = 'could not convert string to int')

Source from the content-addressed store, hash-verified

11
12
13def smart_string_to_int(
14 string: str,
15 e: str = 'could not convert string to int') -> int:
16 try:
17 ret = int(string)
18 return ret
19 except ValueError:
20 raise ValueError(e)
21
22
23def parse_config(

Callers 1

parse_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected