Add ruff to the "format" session
`ruff format` adds parentheses around multi-line lambda bodies and removes blank lines after block openers, both of which `black` accepts. Lines with `# type:ignore` are shortened because `black` counts pragma comments toward the line length and `ruff` does not.
This commit is contained in:
parent
318dff8fc8
commit
e451f03d0f
1 changed files with 123 additions and 79 deletions
|
|
@ -45,12 +45,16 @@ class ScheduledOrderFactory(ad_hoc.AdHocOrderFactory):
|
|||
|
||||
# Restaurant-related attributes
|
||||
restaurant_notified_at = factory.LazyAttribute(
|
||||
lambda obj: obj.scheduled_delivery_at
|
||||
- utils.random_timespan(min_minutes=45, max_minutes=50),
|
||||
lambda obj: (
|
||||
obj.scheduled_delivery_at
|
||||
- utils.random_timespan(min_minutes=45, max_minutes=50)
|
||||
),
|
||||
)
|
||||
|
||||
# Dispatch-related attributes
|
||||
dispatch_at = factory.LazyAttribute(
|
||||
lambda obj: obj.scheduled_delivery_at
|
||||
- utils.random_timespan(min_minutes=40, max_minutes=45),
|
||||
lambda obj: (
|
||||
obj.scheduled_delivery_at
|
||||
- utils.random_timespan(min_minutes=40, max_minutes=45)
|
||||
),
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue