[pgAdmin][SonarQube] Reduce cognitive complexity

From: Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: [pgAdmin][SonarQube] Reduce cognitive complexity
Date: 2020-09-08 12:42:47
Message-ID: CAM9w-_moH7tyW-+Bq-8GbM13N+ck2-enRzQgDdDpM+MRMGrAgA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Attached patch reduces the cognitive complexity as below:
web/pgadmin/tools/sqleditor/utils/is_begin_required.py - 89 to 15
web/pgadmin/utils/driver/psycopg2/connection.py - 16 to 15
web/setup.py - 17 to 15

Please review.

--
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
<http://edbpostgres.com>
"Don't Complain about Heat, Plant a TREE"

Attachment Content-Type Size
sonarqube.begin.patch application/octet-stream 10.9 KB

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Akshay Joshi 2020-09-09 05:56:01 pgAdmin 4 commit: Fixed cognitive complexity issues reported by SonarQu
Previous Message Dave Page 2020-09-08 11:56:19 Re: Patch for SonarQube code scan fixes.