Skip to content

Commit

Permalink
Fix undefined logger.warn for loguru
Browse files Browse the repository at this point in the history
  • Loading branch information
wkentaro committed Jan 23, 2025
1 parent 1cc5db5 commit 2f500d1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion labelme/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ def __init__(
self.statusBar().show()

if output_file is not None and self._config["auto_save"]:
logger.warn(
logger.warning(
"If `auto_save` argument is True, `output_file` argument "
"is ignored and output filename is automatically "
"set as IMAGE_BASENAME.json."
Expand Down
4 changes: 2 additions & 2 deletions labelme/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def update_dict(target_dict, new_dict, validate_item=None):
if validate_item:
validate_item(key, value)
if key not in target_dict:
logger.warn("Skipping unexpected key in config: {}".format(key))
logger.warning("Skipping unexpected key in config: {}".format(key))
continue
if isinstance(target_dict[key], dict) and isinstance(value, dict):
update_dict(target_dict[key], value, validate_item=validate_item)
Expand All @@ -34,7 +34,7 @@ def get_default_config():
try:
shutil.copy(config_file, user_config_file)
except Exception:
logger.warn("Failed to save config: {}".format(user_config_file))
logger.warning("Failed to save config: {}".format(user_config_file))

return config

Expand Down
2 changes: 1 addition & 1 deletion labelme/utils/shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def shapes_to_label(img_shape, shapes, label_name_to_value):


def labelme_shapes_to_label(img_shape, shapes):
logger.warn(
logger.warning(
"labelme_shapes_to_label is deprecated, so please use " "shapes_to_label."
)

Expand Down
2 changes: 1 addition & 1 deletion labelme/widgets/label_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def __init__(
# completion
completer = QtWidgets.QCompleter()
if not QT5 and completion != "startswith":
logger.warn(
logger.warning(
"completion other than 'startswith' is only "
"supported with Qt5. Using 'startswith'"
)
Expand Down

0 comments on commit 2f500d1

Please sign in to comment.