Fix deprecation warning (#14091)

Co-authored-by: UltralyticsAssistant <web@ultralytics.com>
This commit is contained in:
Glenn Jocher 2024-06-29 17:37:17 +02:00 committed by GitHub
parent 9d06438aa1
commit 48f4800ec6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1026,13 +1026,10 @@ class SettingsManager(dict):
self.save()
def deprecation_warn(arg, new_arg, version=None):
def deprecation_warn(arg, new_arg):
"""Issue a deprecation warning when a deprecated argument is used, suggesting an updated argument."""
if not version:
version = float(__version__[:3]) + 0.2 # deprecate after 2nd major release
LOGGER.warning(
f"WARNING ⚠️ '{arg}' is deprecated and will be removed in 'ultralytics {version}' in the future. "
f"Please use '{new_arg}' instead."
f"WARNING ⚠️ '{arg}' is deprecated and will be removed in in the future. " f"Please use '{new_arg}' instead."
)