Forbid too long call chains #842
Labels
Hacktoberfest
Hactoberfest fun!
help wanted
Extra attention is needed
level:starter
Good for newcomers
rule request
Adding a new rule
Milestone
Rule request
Thesis
In case you work with a really strange API that uses a lot of nested decorator functions (or with lots of partial application and curing) you can end up with something like this in your code base:
Well, that's not pythonic. This is a complexity rule to limit this kind of situations.
What do we need?
max_call_level
2
, where3
calls will result in a violationRelated:
wemake-python-styleguide/wemake_python_styleguide/violations/complexity.py
Line 576 in 8e759c1
Related: #737 (where almost the same feature is implemented)
The text was updated successfully, but these errors were encountered: