Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFt6F-00046K-Ri for pgadmin-hackers@arkaria.postgresql.org; Wed, 09 Sep 2020 05:56:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kFt6E-0006AY-OR for pgadmin-hackers@arkaria.postgresql.org; Wed, 09 Sep 2020 05:56:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFt6E-0006AR-F3 for pgadmin-hackers@lists.postgresql.org; Wed, 09 Sep 2020 05:56:54 +0000 Received: from mail-io1-xd31.google.com ([2607:f8b0:4864:20::d31]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kFt6B-0001bD-TC for pgadmin-hackers@postgresql.org; Wed, 09 Sep 2020 05:56:54 +0000 Received: by mail-io1-xd31.google.com with SMTP id d190so1934070iof.3 for ; Tue, 08 Sep 2020 22:56:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BNenxMMBZ+5vwSnofaf4vROvSP+xYNV6NzAd3BpKQJY=; b=NX/fi1IIhUf/ZcBsFsrwC+KpMBtR5v6nPFD5lr5R/T+zn7WR6LTW8Aszj8l//foX4m RdWu36ace9c3soRgbewOuFoYrRdyPPlND9f9fnPbjiuqCP0vI7hS7ezloujIE3D39m3A tgzasbaee0KIBVy7aJnwImqmf93OBiyS9f/8H7it2sbKMPygwY27Ewl/gu5q4k10NP4F qaIDfY/rmQsIHJTRPhucaqiYfY3TqGo/ZGA6rn/7kdbcTVdBWp4pxWOk9GltwqWrU/YI NZK50RJAjbtxXBGb5V058YU3iJ3TjGkrEVlpdkhTfCd0vksZr1Ln7X98zrraXIgMQS64 pz/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BNenxMMBZ+5vwSnofaf4vROvSP+xYNV6NzAd3BpKQJY=; b=F+ReP7xw/4nBuXFzMZbbO5EIOtSZX2vExw/bRx1c2RyG3tXS8K8xed8uRJtBMzdS4K MgJnw3WSodcuQPHBUA2d8Gr0Mo+URvcSGMkY5vfQ+J3N0r3kUqd29SfaaMjJr59c2mVP czgwaCk+V2SAsCyrIrSfvSuzgMASupzFmdeGW2elpJyraCYX6Ob/F0VdA0O0MYNmkmw3 JZxJ9CVp4imu1IV2bPlnsKh/7qNEZf4xFPSQ9XIIKfoPWn1YdcsMCcxp2RTPE7tIgx+p QMqD5EPs7K9T+H0ovOdSuGTy3wJ6Np7LIhtDcglqHHC7hoiP7v3HIsuQF7frPTYhwemZ 1izQ== X-Gm-Message-State: AOAM530RtGwS9bTZsoz2hPmCIGBxobAAgZeVmL3R15N8hyJVudKDDALd mFRD3cvqZQAmQbZuoxV/dny7XD/Kiig18J5I4pLyIrbgK2lXUgV6vycQCQWgS+Yut2U3IP1B/FS KbLIeT4YntLsJNy0uHNnSv7dIbJ8CMKLqqJ3WTUv4/A09p0+7QMfkbPtzMOoH8TQtS/CfSKrNTO LSHwqo5bUCIOjrhCvEsH3SSN3GbAJnzDLs7+TJikHSWdKMCvLZqz2FL0EiBA== X-Google-Smtp-Source: ABdhPJwQ2WgxyH3bVPPC4Jdi5I9UBbRufAUmzW/19qpa3PmWP7pL/Y/19s6hrZPzwWvs5BFqKM5+1wFhBIw92GxhXhg= X-Received: by 2002:a02:ce8c:: with SMTP id y12mr2644919jaq.53.1599631010135; Tue, 08 Sep 2020 22:56:50 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Akshay Joshi Date: Wed, 9 Sep 2020 11:26:39 +0530 Message-ID: Subject: Re: [pgAdmin][SonarQube] Reduce cognitive complexity To: Aditya Toshniwal Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="0000000000002194d905aedb1ef9" X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --0000000000002194d905aedb1ef9 Content-Type: text/plain; charset="UTF-8" Thanks, patch applied. On Tue, Sep 8, 2020 at 6:13 PM Aditya Toshniwal < aditya.toshniwal@enterprisedb.com> wrote: > 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* > > "Don't Complain about Heat, Plant a TREE" > -- *Thanks & Regards* *Akshay Joshi* *pgAdmin Hacker | Sr. Software Architect* *EDB Postgres * *Mobile: +91 976-788-8246* --0000000000002194d905aedb1ef9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, patch applied.

On Tue, Sep 8, 2020 at 6:13 PM A= ditya Toshniwal <ad= itya.toshniwal@enterprisedb.com> wrote:
Attached patch reduces the cognitive complexity as below:
web/= pgadmin/tools/sqleditor/utils/is_begin_required.py - 89 to 15
web/pgadmi= n/utils/driver/psycopg2/connection.py - 16 to 15
web/setup.py - 17 to 15=

Please review.

-- =
Thanks,
Adi= tya Toshniwal
pgAdmin hacker=C2=A0| Sr. Software Eng= ineer | edbpostgres.com=
"Don't Complain about Heat, Plant a TREE"


--
Thanks & Regards
Akshay Joshi
<= div>pgAdmin Hacker | = Sr. Software Architect
EDB Postgres
Mobile: +91 976-788-8246

<= /div>
--0000000000002194d905aedb1ef9--