On 21/07/2022 3:52 pm, Sencer Hamarat wrote:
> Hi everyone,
>
> I have a code block with high cognitive complexity below:
>
> @staticmethod
> def in_circle_check(obj_type, item, uuid, item_is_array=False):
Partly because the args seem weird.
Try writing a docstring which says what the method needs to do. Then
rewrite the code as nested if statements, bearing in mind that if
nothing fits, it will fall through to the end and return either None or
whatever you want to return, perhaps -1.
> <
https://groups.google.com/d/msgid/django-users/CACp8TZhBa9EbekcT1ApmzdDRVk2vCb64%3DvvXHrSawO2RJSySpQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
Signed email is an absolute defence against phishing. This email has
been signed with my private key. If you import my public key you can
automatically decrypt my signature and be sure it came from me. Just
ask and I'll send it to you. Your email software can handle signing.