There is no 'too deep nesting'

This commit is contained in:
Alexander Hess 2021-09-15 11:49:08 +02:00
commit 7e23033d84
Signed by: alexander
GPG key ID: 344EA5AB10D868E0
5 changed files with 27 additions and 25 deletions

View file

@ -169,15 +169,15 @@ class City(meta.Base):
)
# ... and adjust the size of the red dot on the `.map`.
if n_orders >= 1000:
radius = 20 # noqa:WPS220
radius = 20
elif n_orders >= 500:
radius = 15 # noqa:WPS220
radius = 15
elif n_orders >= 100:
radius = 10 # noqa:WPS220
radius = 10
elif n_orders >= 10:
radius = 5 # noqa:WPS220
radius = 5
else:
radius = 1 # noqa:WPS220
radius = 1
tooltip += f' | n_orders={n_orders}' # noqa:WPS336

View file

@ -90,15 +90,15 @@ class Customer(meta.Base):
.count()
)
if n_orders >= 25:
radius = 20 # noqa:WPS220
radius = 20
elif n_orders >= 10:
radius = 15 # noqa:WPS220
radius = 15
elif n_orders >= 5:
radius = 10 # noqa:WPS220
radius = 10
elif n_orders > 1:
radius = 5 # noqa:WPS220
radius = 5
else:
radius = 1 # noqa:WPS220
radius = 1
address.draw(
radius=radius,
@ -156,15 +156,15 @@ class Customer(meta.Base):
.count()
)
if n_orders >= 25:
radius = 20 # noqa:WPS220
radius = 20
elif n_orders >= 10:
radius = 15 # noqa:WPS220
radius = 15
elif n_orders >= 5:
radius = 10 # noqa:WPS220
radius = 10
elif n_orders > 1:
radius = 5 # noqa:WPS220
radius = 5
else:
radius = 1 # noqa:WPS220
radius = 1
tooltip += f' | n_orders={n_orders}' # noqa:WPS336

View file

@ -226,15 +226,15 @@ class Pixel(meta.Base):
)
# ... and adjust the size of the red dot on the `.map`.
if n_orders >= 1000:
radius = 20 # noqa:WPS220
radius = 20
elif n_orders >= 500:
radius = 15 # noqa:WPS220
radius = 15
elif n_orders >= 100:
radius = 10 # noqa:WPS220
radius = 10
elif n_orders >= 10:
radius = 5 # noqa:WPS220
radius = 5
else:
radius = 1 # noqa:WPS220
radius = 1
tooltip += f' | n_orders={n_orders}' # noqa:WPS336

View file

@ -116,15 +116,15 @@ class Restaurant(meta.Base):
.count()
)
if n_orders >= 25:
radius = 20 # noqa:WPS220
radius = 20
elif n_orders >= 10:
radius = 15 # noqa:WPS220
radius = 15
elif n_orders >= 5:
radius = 10 # noqa:WPS220
radius = 10
elif n_orders > 1:
radius = 5 # noqa:WPS220
radius = 5
else:
radius = 1 # noqa:WPS220
radius = 1
address.draw(
radius=radius,