Remove the config of flake8-expression-complexity
This commit is contained in:
parent
b24eb80f70
commit
137b3b1e03
4 changed files with 13 additions and 13 deletions
|
|
@ -187,7 +187,7 @@ class AdHocOrderFactory(alchemy.SQLAlchemyModelFactory):
|
|||
(obj.delivery_address.latitude, obj.delivery_address.longitude),
|
||||
).meters,
|
||||
)
|
||||
logged_avg_speed = factory.LazyAttribute( # noqa:ECE001
|
||||
logged_avg_speed = factory.LazyAttribute(
|
||||
lambda obj: round(
|
||||
(
|
||||
obj.logged_avg_speed_distance
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ class TestSyncWithGoogleMaps:
|
|||
@pytest.fixture
|
||||
def api_response(self):
|
||||
"""A typical (shortened) response by the Google Maps Directions API."""
|
||||
return [ # noqa:ECE001
|
||||
return [
|
||||
{
|
||||
'bounds': {
|
||||
'northeast': {'lat': 44.8554284, 'lng': -0.5652398},
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class TestGridification:
|
|||
all considered `Order.pickup_address` attributes for some orders.
|
||||
"""
|
||||
mock = mocker.Mock()
|
||||
query = ( # noqa:ECE001
|
||||
query = (
|
||||
mock.query.return_value.join.return_value.filter.return_value.all # noqa:E501
|
||||
)
|
||||
monkeypatch.setattr(db, 'session', mock)
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ class TestProperties:
|
|||
def _restaurants_mock(self, mocker, monkeypatch, restaurant):
|
||||
"""A `Mock` whose `.return_value` is `[restaurant]`."""
|
||||
mock = mocker.Mock()
|
||||
query = ( # noqa:ECE001
|
||||
query = (
|
||||
mock.query.return_value.join.return_value.filter.return_value.all # noqa:E501
|
||||
)
|
||||
query.return_value = [restaurant]
|
||||
|
|
|
|||
Loading…
Reference in a new issue