From f9a7955c1321f895535cde5461072f582be77c76 Mon Sep 17 00:00:00 2001 From: Felipe Alex Hofmann Date: Mon, 22 Apr 2024 08:21:41 -0700 Subject: [PATCH] Fix warning (#404) --- copulas/__init__.py | 2 +- tests/unit/test___init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/copulas/__init__.py b/copulas/__init__.py index bf40e3d8..95752d55 100644 --- a/copulas/__init__.py +++ b/copulas/__init__.py @@ -321,7 +321,7 @@ def _find_addons(): try: addon = entry_point.load() except Exception: # pylint: disable=broad-exception-caught - msg = f'Failed to load "{entry_point.name}" from "{entry_point.version}".' + msg = f'Failed to load "{entry_point.name}" from "{entry_point.value}".' warnings.warn(msg) continue diff --git a/tests/unit/test___init__.py b/tests/unit/test___init__.py index acd216f7..fd861328 100644 --- a/tests/unit/test___init__.py +++ b/tests/unit/test___init__.py @@ -479,7 +479,7 @@ def entry_point_error(): bad_entry_point = MagicMock() bad_entry_point.name = 'bad_entry_point' - bad_entry_point.version = 'bad_module' + bad_entry_point.value = 'bad_module' bad_entry_point.load.side_effect = entry_point_error entry_points_mock.return_value = [bad_entry_point] msg = 'Failed to load "bad_entry_point" from "bad_module".'