You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a builder class that we'll instantiate and get a result from all in a single statement. This works well because most of the time we only need to set a few things on the builder, and we don't want the builder to live on once the result has been obtained.
These expressions do not look complex. There is nothing nested. However, these statements fail on ECE001.
Describe the bug
We have a builder class that we'll instantiate and get a result from all in a single statement. This works well because most of the time we only need to set a few things on the builder, and we don't want the builder to live on once the result has been obtained.
These expressions do not look complex. There is nothing nested. However, these statements fail on
ECE001
.To Reproduce
Put this code in a file named
test.py
:Install
flake8-expression-complexity
.Put this config in a file named
setup.cfg
:Run
flake8 test.py
in the directory containing these files. Observe the following output:Also observe that flake8 exits with a non-zero exit status code.
Expected behavior
Running
flake8 test.py
results in no errors and an exit status of0
.Additional context
Basically it isn't clear why these chained method calls are considered "complex".
The text was updated successfully, but these errors were encountered: