diff options
Diffstat (limited to 'pylint/checkers/typecheck.py')
-rw-r--r-- | pylint/checkers/typecheck.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pylint/checkers/typecheck.py b/pylint/checkers/typecheck.py index d814918d6..85454c4a0 100644 --- a/pylint/checkers/typecheck.py +++ b/pylint/checkers/typecheck.py @@ -762,6 +762,16 @@ accessed. Python regular expressions are accepted.", "found. The aspect of finding the hint is based on edit distance.", }, ), + ( + "signature-mutators", + { + "default": [], + "type": "csv", + "metavar": "<decorator names>", + "help": "List of decorators that change the signature of " + "a decorated function.", + }, + ), ) @decorators.cachedproperty @@ -1089,6 +1099,12 @@ accessed. Python regular expressions are accepted.", # Can't make sense of this. return + # Has the function signature changed in ways we cannot reliably detect? + if hasattr(called, "decorators") and decorated_with( + called, self.config.signature_mutators + ): + return + num_positional_args = len(call_site.positional_arguments) keyword_args = list(call_site.keyword_arguments.keys()) |