diff options
author | dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> | 2022-12-27 00:13:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-27 00:13:13 +0100 |
commit | a96e05bf73b6fbba8edf78aa9adde3e1faa16b66 (patch) | |
tree | 9256f4b7f9756fcba52263036e087c19179d4aed /astroid/decorators.py | |
parent | 3894c593f5266d8692b8b5b4ebe83c0c9ae4c946 (diff) | |
download | astroid-git-a96e05bf73b6fbba8edf78aa9adde3e1faa16b66.tar.gz |
Bump pylint from 2.15.8 to 2.15.9 (#1907)
Diffstat (limited to 'astroid/decorators.py')
-rw-r--r-- | astroid/decorators.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/astroid/decorators.py b/astroid/decorators.py index 935d34cb..7ce157b9 100644 --- a/astroid/decorators.py +++ b/astroid/decorators.py @@ -189,7 +189,7 @@ if util.check_warnings_filter(): # noqa: C901 try: index = keys.index(arg) except ValueError: - raise Exception( + raise ValueError( f"Can't find argument '{arg}' for '{args[0].__class__.__qualname__}'" ) from None if ( @@ -237,13 +237,12 @@ if util.check_warnings_filter(): # noqa: C901 def deco(func: Callable[_P, _R]) -> Callable[_P, _R]: @functools.wraps(func) def wrapper(*args: _P.args, **kwargs: _P.kwargs) -> _R: - keys = list(inspect.signature(func).parameters.keys()) for arg, note in arguments.items(): try: index = keys.index(arg) except ValueError: - raise Exception( + raise ValueError( f"Can't find argument '{arg}' for '{args[0].__class__.__qualname__}'" ) from None if arg in kwargs or len(args) > index: |