Enable FBT in flake8 and ruff
This commit is contained in:
parent
d0326aee4f
commit
5beb88559f
7 changed files with 36 additions and 4 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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`.
|
||||
|
|
|
|||
|
|
@ -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`.
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ class Restaurant(meta.Base):
|
|||
|
||||
def draw(
|
||||
self,
|
||||
*,
|
||||
customers: bool = True,
|
||||
order_counts: bool = False, # pragma: no cover
|
||||
) -> folium.Map:
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue