Break multi-line comments before conjunctions

This commit is contained in:
Alexander Hess 2026-12-03 10:13:13 +01:00
commit 2f1afd459f
Signed by: alexander
GPG key ID: B46EDB4DFC26805D
7 changed files with 27 additions and 27 deletions

View file

@ -305,8 +305,8 @@ class Path(meta.Base):
# the `.waypoints` are not available
self.sync_with_google_maps()
# First, plot the couriers' path between the start and
# end locations, so that it is below the `folium.Circle`s
# First, plot the couriers' path between the start and end locations,
# so that it is below the `folium.Circle`s
line = folium.PolyLine(
locations=(
self.first_address.location.lat_lng,

View file

@ -69,8 +69,8 @@ class Customer(meta.Base):
# Note: a `Customer` may have more than one delivery `Address`es.
# That is not true for `Restaurant`s after the data cleaning.
# Obtain all primary `Address`es where
# at least one delivery was made to `self`
# Obtain all primary `Address`es
# where at least one delivery was made to `self`
delivery_addresses = db.session.scalars(
sa.select(db.Address).where(
db.Address.id.in_(

View file

@ -50,8 +50,8 @@ class Forecast(meta.Base):
nullable=False,
)
# We also store the actual order counts for convenient retrieval.
# A `UniqueConstraint` below ensures that redundant values that
# are to be expected are consistent across rows.
# A `UniqueConstraint` below ensures that redundant values
# that are to be expected are consistent across rows.
actual: orm.Mapped[int] = orm.mapped_column(
sa.SmallInteger,
nullable=False,

View file

@ -216,8 +216,8 @@ class ReplayedOrder(meta.Base):
sa.CheckConstraint(
# A simulation must fill in at least all the timing and dispatch related
# columns, unless an order is cancelled in a run.
# Only `.estimated_prep_duration`, `.first_estimated_delivery_at`, and
# `.utilization` are truly optional.
# Only `.estimated_prep_duration`, `.first_estimated_delivery_at`,
# and `.utilization` are truly optional.
# This constraint does allow missing columns for cancelled orders
# in any combination of the below columns. So, no precedence constraints
# are enforced (e.g., `.restaurant_notified_at` and `.restaurant_ready_at`
@ -326,8 +326,8 @@ class ReplayedOrder(meta.Base):
name="orders_dispatched_in_business_hours",
),
*(
# The timestamps must be in a logically correct order. That is the same as
# in the actual `Order` model with an extra `restaurant_ready_at` column
# The timestamps must be in a logically correct order. That is the same
# as in the actual `Order` model with an extra `restaurant_ready_at` column
# and the non-simulated columns removed.
sa.CheckConstraint(
constraint,

View file

@ -110,8 +110,8 @@ class Restaurant(meta.Base):
`.address.city.map` for convenience in interactive usage
"""
if customers:
# Obtain all primary `Address`es in the city that
# received at least one delivery from `self`
# Obtain all primary `Address`es in the city
# that received at least one delivery from `self`
delivery_addresses = db.session.scalars(
sa.select(db.Address).where(
db.Address.id.in_(

View file

@ -44,8 +44,8 @@ def predict(
seasonal_lag = frequency * (training_ts.index[1] - training_ts.index[0])
for lag in range(frequency):
# Obtain all `observations` of the same seasonal lag and
# fit a straight line through them (= `trend`)
# Obtain all `observations` of the same seasonal lag
# and fit a straight line through them (= `trend`)
observations = training_ts[slice(lag, 999_999_999, frequency)]
trend = observations - tsa.detrend(observations)

View file

@ -93,8 +93,8 @@ class ForecastingModelABC(abc.ABC):
return cached_forecast
# Horizontal and real-time `*Model`s return a `pd.DataFrame` with one
# row corresponding to the time step starting at `predict_at` whereas
# vertical models return several rows, covering all time steps of a day
# row corresponding to the time step starting at `predict_at`
# whereas vertical models return several rows, covering all time steps of a day
predictions = self.predict(pixel, predict_at, train_horizon)
# Convert the `predictions` into a `list` of `Forecast` objects