ultralytics 8.3.8 replace contextlib with try for speed (#16782)
Signed-off-by: UltralyticsAssistant <web@ultralytics.com> Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
parent
1e6c454460
commit
a6a577961f
12 changed files with 115 additions and 88 deletions
|
|
@ -669,9 +669,10 @@ def smart_value(v):
|
|||
elif v_lower == "false":
|
||||
return False
|
||||
else:
|
||||
with contextlib.suppress(Exception):
|
||||
try:
|
||||
return eval(v)
|
||||
return v
|
||||
except: # noqa E722
|
||||
return v
|
||||
|
||||
|
||||
def entrypoint(debug=""):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue