Do not compute the size of statically sized objects.
72
73
74# Raises "Use `size` instead of `count`"
75[1, 2, 3].count
Description
Sizes of objects that we know to be static should not be computed.
For example, we know the size of array in the snippet below to be 3
. We can directly use the value instead of calculating it first.
Bad practice
[1, 2, 3].count
Recommended
[1, 2, *arr].count