We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
from typing import Callable from functools import wraps do_something: Callable[[], int] def with_config(func): @wraps(func) def wrapper(): return func("arg") return wrapper @with_config def do_something(arg: str) -> int: return len(arg)
No response
pylint -E example.py
************* Module example example.py:16:0: E0102: function already defined line 4 (function-redefined)
No output; the function is not being redefined because the top instance is not a definition — it is a type declaration.
pylint 2.10.2 astroid 2.7.3 Python 3.9.5 (default, May 24 2021, 12:50:35) [GCC 11.1.0]
The text was updated successfully, but these errors were encountered:
Fix false positive for function-redefined for simple type annotations
function-redefined
741f147
Closes pylint-dev#4936
8b778cd
Closes #4936
Successfully merging a pull request may close this issue.
Bug description
Configuration
No response
Command used
Pylint output
Expected behavior
No output; the function is not being redefined because the top instance is not a definition — it is a type declaration.
Pylint version
OS / Environment
No response
Additional dependencies
No response
The text was updated successfully, but these errors were encountered: