There is no 'too deep nesting'
This commit is contained in:
parent
5978b0e92f
commit
7e23033d84
5 changed files with 27 additions and 25 deletions
|
@ -93,6 +93,8 @@ extend-ignore =
|
||||||
# until after being processed by Sphinx Napoleon.
|
# until after being processed by Sphinx Napoleon.
|
||||||
# Source: https://github.com/peterjc/flake8-rst-docstrings/issues/17
|
# Source: https://github.com/peterjc/flake8-rst-docstrings/issues/17
|
||||||
RST201,RST203,RST210,RST213,RST301,
|
RST201,RST203,RST210,RST213,RST301,
|
||||||
|
# The "too deep nesting" violation fires off "too early" and cannot be configured.
|
||||||
|
WPS220,
|
||||||
# String constant over-use is checked visually by the programmer.
|
# String constant over-use is checked visually by the programmer.
|
||||||
WPS226,
|
WPS226,
|
||||||
# Modules as a whole are assumed to be not "too complex".
|
# Modules as a whole are assumed to be not "too complex".
|
||||||
|
|
|
@ -169,15 +169,15 @@ class City(meta.Base):
|
||||||
)
|
)
|
||||||
# ... and adjust the size of the red dot on the `.map`.
|
# ... and adjust the size of the red dot on the `.map`.
|
||||||
if n_orders >= 1000:
|
if n_orders >= 1000:
|
||||||
radius = 20 # noqa:WPS220
|
radius = 20
|
||||||
elif n_orders >= 500:
|
elif n_orders >= 500:
|
||||||
radius = 15 # noqa:WPS220
|
radius = 15
|
||||||
elif n_orders >= 100:
|
elif n_orders >= 100:
|
||||||
radius = 10 # noqa:WPS220
|
radius = 10
|
||||||
elif n_orders >= 10:
|
elif n_orders >= 10:
|
||||||
radius = 5 # noqa:WPS220
|
radius = 5
|
||||||
else:
|
else:
|
||||||
radius = 1 # noqa:WPS220
|
radius = 1
|
||||||
|
|
||||||
tooltip += f' | n_orders={n_orders}' # noqa:WPS336
|
tooltip += f' | n_orders={n_orders}' # noqa:WPS336
|
||||||
|
|
||||||
|
|
|
@ -90,15 +90,15 @@ class Customer(meta.Base):
|
||||||
.count()
|
.count()
|
||||||
)
|
)
|
||||||
if n_orders >= 25:
|
if n_orders >= 25:
|
||||||
radius = 20 # noqa:WPS220
|
radius = 20
|
||||||
elif n_orders >= 10:
|
elif n_orders >= 10:
|
||||||
radius = 15 # noqa:WPS220
|
radius = 15
|
||||||
elif n_orders >= 5:
|
elif n_orders >= 5:
|
||||||
radius = 10 # noqa:WPS220
|
radius = 10
|
||||||
elif n_orders > 1:
|
elif n_orders > 1:
|
||||||
radius = 5 # noqa:WPS220
|
radius = 5
|
||||||
else:
|
else:
|
||||||
radius = 1 # noqa:WPS220
|
radius = 1
|
||||||
|
|
||||||
address.draw(
|
address.draw(
|
||||||
radius=radius,
|
radius=radius,
|
||||||
|
@ -156,15 +156,15 @@ class Customer(meta.Base):
|
||||||
.count()
|
.count()
|
||||||
)
|
)
|
||||||
if n_orders >= 25:
|
if n_orders >= 25:
|
||||||
radius = 20 # noqa:WPS220
|
radius = 20
|
||||||
elif n_orders >= 10:
|
elif n_orders >= 10:
|
||||||
radius = 15 # noqa:WPS220
|
radius = 15
|
||||||
elif n_orders >= 5:
|
elif n_orders >= 5:
|
||||||
radius = 10 # noqa:WPS220
|
radius = 10
|
||||||
elif n_orders > 1:
|
elif n_orders > 1:
|
||||||
radius = 5 # noqa:WPS220
|
radius = 5
|
||||||
else:
|
else:
|
||||||
radius = 1 # noqa:WPS220
|
radius = 1
|
||||||
|
|
||||||
tooltip += f' | n_orders={n_orders}' # noqa:WPS336
|
tooltip += f' | n_orders={n_orders}' # noqa:WPS336
|
||||||
|
|
||||||
|
|
|
@ -226,15 +226,15 @@ class Pixel(meta.Base):
|
||||||
)
|
)
|
||||||
# ... and adjust the size of the red dot on the `.map`.
|
# ... and adjust the size of the red dot on the `.map`.
|
||||||
if n_orders >= 1000:
|
if n_orders >= 1000:
|
||||||
radius = 20 # noqa:WPS220
|
radius = 20
|
||||||
elif n_orders >= 500:
|
elif n_orders >= 500:
|
||||||
radius = 15 # noqa:WPS220
|
radius = 15
|
||||||
elif n_orders >= 100:
|
elif n_orders >= 100:
|
||||||
radius = 10 # noqa:WPS220
|
radius = 10
|
||||||
elif n_orders >= 10:
|
elif n_orders >= 10:
|
||||||
radius = 5 # noqa:WPS220
|
radius = 5
|
||||||
else:
|
else:
|
||||||
radius = 1 # noqa:WPS220
|
radius = 1
|
||||||
|
|
||||||
tooltip += f' | n_orders={n_orders}' # noqa:WPS336
|
tooltip += f' | n_orders={n_orders}' # noqa:WPS336
|
||||||
|
|
||||||
|
|
|
@ -116,15 +116,15 @@ class Restaurant(meta.Base):
|
||||||
.count()
|
.count()
|
||||||
)
|
)
|
||||||
if n_orders >= 25:
|
if n_orders >= 25:
|
||||||
radius = 20 # noqa:WPS220
|
radius = 20
|
||||||
elif n_orders >= 10:
|
elif n_orders >= 10:
|
||||||
radius = 15 # noqa:WPS220
|
radius = 15
|
||||||
elif n_orders >= 5:
|
elif n_orders >= 5:
|
||||||
radius = 10 # noqa:WPS220
|
radius = 10
|
||||||
elif n_orders > 1:
|
elif n_orders > 1:
|
||||||
radius = 5 # noqa:WPS220
|
radius = 5
|
||||||
else:
|
else:
|
||||||
radius = 1 # noqa:WPS220
|
radius = 1
|
||||||
|
|
||||||
address.draw(
|
address.draw(
|
||||||
radius=radius,
|
radius=radius,
|
||||||
|
|
Loading…
Reference in a new issue