Enable FBT in flake8 and ruff

This commit is contained in:
Alexander Hess 2026-11-30 22:43:35 +01:00
commit 5beb88559f
Signed by: alexander
GPG key ID: B46EDB4DFC26805D
7 changed files with 36 additions and 4 deletions

View file

@ -8,7 +8,12 @@ from click import core as cli_core
import velofy
def show_version(ctx: cli_core.Context, _param: t.Any, value: bool) -> None:
def show_version(
ctx: cli_core.Context,
_param: t.Any,
# `click` passes all arguments to callbacks positionally
value: bool, # noqa:FBT001
) -> None:
"""Show the package's version."""
# If --version / -V is NOT passed in,
# continue with the command.

View file

@ -183,7 +183,7 @@ class Path(meta.Base):
return paths
@classmethod
def from_order(cls, order: db.Order, google_maps: bool = False) -> Path:
def from_order(cls, order: db.Order, *, google_maps: bool = False) -> Path:
"""Calculate the path for an `Order` object.
The path goes from the `Order.pickup_address` to the `Order.delivery_address`.

View file

@ -149,6 +149,7 @@ class City(meta.Base):
def draw_restaurants(
self,
*,
order_counts: bool = False, # pragma: no cover
) -> folium.Map:
"""Draw all restaurants on the`.map`.

View file

@ -46,6 +46,7 @@ class Customer(meta.Base):
def draw( # noqa:C901,PLR0912
self,
*,
restaurants: bool = True,
order_counts: bool = False, # pragma: no cover
) -> folium.Map:

View file

@ -158,6 +158,7 @@ class Pixel(meta.Base):
def draw( # noqa:C901,PLR0912
self,
*,
restaurants: bool = True,
order_counts: bool = False, # pragma: no cover
) -> folium.Map:

View file

@ -91,6 +91,7 @@ class Restaurant(meta.Base):
def draw(
self,
*,
customers: bool = True,
order_counts: bool = False, # pragma: no cover
) -> folium.Map:

View file

@ -8,6 +8,7 @@ from matplotlib import colors
def make_random_cmap(
n_colors: int,
*,
bright: bool = True, # pragma: no cover
) -> colors.LinearSegmentedColormap:
"""Create a random `Colormap` with `n_colors` different colors.