pylint-bot / pylint-unofficial

UNOFFICIAL playground for pylint github migration
0 stars 0 forks source link

warn upon too many decorators #676

Open pylint-bot opened 9 years ago

pylint-bot commented 9 years ago

Originally reported by: Laura Médioni (BitBucket: lmedioni, GitHub: @lmedioni?)


Emit a "refactor" type message when too many decorators are applied on a method or a function.

The maximum number of tolerated decorators should be configurable (--max-decorators option), defaulting to 5.


pylint-bot commented 9 years ago

Original comment by Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore):


This might be useful, but the question is if you do have real cases where the developer uses too many decorators. This can happen, for instance, when working with libraries which uses decorators as a form of dispatching. As an example, when working with click you might use more than 5 decorators, but that's just a workflow that's imposed by the library itself.