There is no 'too complex function'
We check a function's cognitive complexity only with `mccabe` (=C901) and not with WPS231 as the two overlap in most cases.
This commit is contained in:
parent
6091ad95c6
commit
f0eb9d3b6f
10 changed files with 13 additions and 12 deletions
|
|
@ -186,9 +186,7 @@ class AdHocOrderFactory(alchemy.SQLAlchemyModelFactory):
|
|||
)
|
||||
|
||||
@factory.post_generation
|
||||
def post( # noqa:C901,WPS231
|
||||
obj, create, extracted, **kwargs, # noqa:B902,N805
|
||||
):
|
||||
def post(obj, _create, _extracted, **_kwargs): # noqa:B902,C901,N805
|
||||
"""Discard timestamps that occur after cancellation."""
|
||||
if obj.cancelled:
|
||||
if obj.cancelled_at <= obj.restaurant_notified_at:
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@ class TestProperties:
|
|||
|
||||
@pytest.mark.db
|
||||
@pytest.mark.no_cover
|
||||
def test_make_random_orders( # noqa:C901,WPS211,WPS213,WPS231
|
||||
def test_make_random_orders( # noqa:C901,WPS211,WPS213
|
||||
db_session, make_address, make_courier, make_restaurant, make_order,
|
||||
):
|
||||
"""Sanity check the all the `make_*` fixtures.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue