Remove periods from one-sentence comments
This commit is contained in:
parent
454c2898a0
commit
049a5f6f62
2 changed files with 308 additions and 308 deletions
|
|
@ -40,7 +40,7 @@ class AdHocOrderFactory(alchemy.SQLAlchemyModelFactory):
|
|||
"""
|
||||
|
||||
# Timestamps after `cancelled_at` are discarded
|
||||
# by the `post_generation` hook at the end of the `OrderFactory`.
|
||||
# by the `post_generation` hook at the end of the `OrderFactory`
|
||||
cancel_ = factory.Trait( # -> leading underscore does not work
|
||||
cancelled=True,
|
||||
cancelled_at_corrected=False,
|
||||
|
|
@ -83,7 +83,7 @@ class AdHocOrderFactory(alchemy.SQLAlchemyModelFactory):
|
|||
ad_hoc = True
|
||||
scheduled_delivery_at = None
|
||||
scheduled_delivery_at_corrected = None
|
||||
# Without statistical info, we assume an ad-hoc `Order` delivered after 45 minutes.
|
||||
# Without statistical info, we assume an ad-hoc `Order` delivered after 45 minutes
|
||||
first_estimated_delivery_at = factory.LazyAttribute(
|
||||
lambda obj: obj.placed_at + dt.timedelta(minutes=45),
|
||||
)
|
||||
|
|
@ -118,7 +118,7 @@ class AdHocOrderFactory(alchemy.SQLAlchemyModelFactory):
|
|||
restaurant_confirmed_at_corrected = factory.LazyAttribute(
|
||||
lambda obj: False if obj.restaurant_confirmed_at else None,
|
||||
)
|
||||
# Use the database defaults of the historic data.
|
||||
# Use the database defaults of the historic data
|
||||
estimated_prep_duration = 900
|
||||
estimated_prep_duration_corrected = False
|
||||
estimated_prep_buffer = 480
|
||||
|
|
@ -150,7 +150,7 @@ class AdHocOrderFactory(alchemy.SQLAlchemyModelFactory):
|
|||
courier_accepted_at_corrected = factory.LazyAttribute(
|
||||
lambda obj: False if obj.courier_accepted_at else None,
|
||||
)
|
||||
# Sample a realistic utilization.
|
||||
# Sample a realistic utilization
|
||||
utilization = factory.LazyFunction(lambda: random.choice([50, 60, 70, 80, 90, 100]))
|
||||
|
||||
# Pickup-related attributes
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ class ScheduledOrderFactory(ad_hoc.AdHocOrderFactory):
|
|||
and calculated backwards from `.scheduled_delivery_at`.
|
||||
"""
|
||||
|
||||
# Attributes regarding the specialization of an `Order`: ad-hoc or scheduled.
|
||||
# Attributes regarding the specialization of an `Order`: ad-hoc or scheduled
|
||||
placed_at = factory.LazyFunction(utils.early_in_the_morning)
|
||||
ad_hoc = False
|
||||
# Discrete `datetime` objects in the "core" lunch time are enough.
|
||||
# Discrete `datetime` objects in the "core" lunch time are enough
|
||||
scheduled_delivery_at = factory.LazyFunction(
|
||||
lambda: random.choice(
|
||||
[
|
||||
|
|
@ -38,7 +38,7 @@ class ScheduledOrderFactory(ad_hoc.AdHocOrderFactory):
|
|||
),
|
||||
)
|
||||
scheduled_delivery_at_corrected = False
|
||||
# Assume the `Order` is on time.
|
||||
# Assume the `Order` is on time
|
||||
first_estimated_delivery_at = factory.LazyAttribute(
|
||||
lambda obj: obj.scheduled_delivery_at,
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue