Skip to content

Commit

Permalink
Fix entry_points warning message (#564)
Browse files Browse the repository at this point in the history
  • Loading branch information
fealho authored Apr 18, 2024
1 parent 019a085 commit 4f8670f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ dev = [
'flake8-mutable>=1.2.0,<1.3',
'flake8-expression-complexity>=0.0.9,<0.1',
'flake8-print>=4.0.0,<4.1',
'flake8-pytest-style>=1.5.0,<3',
'flake8-pytest-style>=2.0.0,<3',
'flake8-quotes>=3.3.0,<4',
'flake8-sfs>=0.0.3,<2',
'flake8-variables-names>=0.0.4,<0.1',
'dlint>=0.11.0,<1',
'isort>=4.3.4,<6',
'isort>=5.13.2,<6',
'pandas-vet>=0.2.3,<2024',
'pep8-naming>=0.12.1,<1',
'pydocstyle>=6.1.1,<7',
Expand Down
2 changes: 1 addition & 1 deletion sdmetrics/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,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.module_name}".'
msg = f'Failed to load "{entry_point.name}" from "{entry_point.value}".'
python_warnings.warn(msg)
continue

Expand Down
6 changes: 5 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ extend-ignore =
# Line break occurred before a binary operator
W503,
# Mutable default arg of type List
M511
M511,
# TokenError: unterminated string literal
E902,
# The module is shadowing a Python builtin module
A005

[aliases]
test = pytest
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test___init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def entry_point_error():

bad_entry_point = Mock()
bad_entry_point.name = 'bad_entry_point'
bad_entry_point.module_name = '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".'
Expand Down

0 comments on commit 4f8670f

Please sign in to comment.