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 1kDolB-00020P-F9 for pgadmin-hackers@arkaria.postgresql.org; Thu, 03 Sep 2020 12:54:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kDolA-00032u-DH for pgadmin-hackers@arkaria.postgresql.org; Thu, 03 Sep 2020 12:54:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kDolA-00032n-2l for pgadmin-hackers@lists.postgresql.org; Thu, 03 Sep 2020 12:54:36 +0000 Received: from mail-io1-xd43.google.com ([2607:f8b0:4864:20::d43]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kDol7-0007el-F1 for pgadmin-hackers@postgresql.org; Thu, 03 Sep 2020 12:54:35 +0000 Received: by mail-io1-xd43.google.com with SMTP id g128so2501358iof.11 for ; Thu, 03 Sep 2020 05:54:33 -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=2af9BE7u9Ipby4z36yV1z252nxkMUvt71b21LRm8TAY=; b=AytAvhJRAvpigFB4idUhN+pzgtGYqUfdCJkfCCFYXN72DeS2QFNaDp2ApI7qg1R/X0 zIiCtDBt+1KMlbXVR0LWaIMcSUOL9FcOkdXGdekLXxAvHq24Tvt9DoBK7wScQe6LZMMi 8kM3XLtjzFteyriJRfVNc3ErbXdvHRKr1FZrOUFWjF2meT5RfL/Ee+tJ92L6bbaxOME1 uk7/FzQzUPED6N3HaWYU15hFB/I3WMQ40xH6CXd9Be5YuOVEuavbixvAkL+uc8IWqNx2 gbeCxtv3GHqiQ+BPfmdOYd4/azG9WI0Vchk5VIeFUz5MltQHhvR7vJvQq0vOKtGKHH7N EaHA== 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=2af9BE7u9Ipby4z36yV1z252nxkMUvt71b21LRm8TAY=; b=UVymo/IrQGjWiLW/tTZYxSBlchs+AntrcLVZDjlIVsZhgGYulyUPJTwh19b3mlra3j C9nTYVrc5ajQJ1aG41DOzL5mo6TmFdvYxM11ULddz20aywle/6zkgBx3huyuEHaiq0Y4 tW6+dG8Gh1MDVCgPWaezCfvhgYAtSBlk/vesmmhPLbPFIBdC6+RPiileeyXq0mwL1T4y 8EEMYlq0ib8nzfORtg+LUYEVq/HmUwCBhCm88c8Qf8m2uBhiHUdFbZe3Y3w1qytvc5WJ /RN+FQGpqVCbR9yyHrgJD6mvcjjyu6r5RqF3/YokNrkd3dM6ZdTa5BPFoxVuAfPBsaEY uyXw== X-Gm-Message-State: AOAM532yiz5wEgITCBNKj/5452JQCB1iKgWhG0uVdnIA0Yrx682Va+jw LRycOF/DpRaD+8fzZ0xotU++pW1fRbu+67aYGVRsr2Oom23xQv9qfFds4dz1Pwj+H1sdy4qxm1I WNqq1liH0LRC5VPhVvA8osjlSmqKdGxXL1yREetfC3P/rhxtD4F9cBudwvox/ZbyEqCY6LDeALI 8OF3RSqrPKykg44og1ctdtPsxlgQKHXUMh8/4g2JkcLW2v5Rb+hld8w3BCDQ== X-Google-Smtp-Source: ABdhPJzKPVVvewtRgfyYTRbWLl6CyLmM6MsaEEDrDdLUH12Fe5kkJ6WN9xrq8mWpKNJaiw2JHRGwNCVwjvRBS88h0NU= X-Received: by 2002:a5e:c70b:: with SMTP id f11mr3060469iop.140.1599137672302; Thu, 03 Sep 2020 05:54:32 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Akshay Joshi Date: Thu, 3 Sep 2020 18:24:21 +0530 Message-ID: Subject: Re: [pgAdmin][SonarQube] : Remove duplicates string literals. To: Pradip Parkale Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="000000000000e7adf805ae68408d" 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 --000000000000e7adf805ae68408d Content-Type: text/plain; charset="UTF-8" Hi Pradip Following are the review comments: - ROLE_NOT_FOUND already in wrapped in gettext() then no need to use like gone(_(ROLE_NOT_FOUND)). In fact, can we use self.not_found_error_msg()instead of new constant. - Same with ERROR_FETCHING_ROLE_INFORMATION it's already in gettext, also we can use this constant for string " Error retrieving roles from the database server" On Thu, Sep 3, 2020 at 4:30 PM Pradip Parkale < pradip.parkale@enterprisedb.com> wrote: > Hi Hackers, > > Attached is a patch for removing duplicates string literals. > /server_groups/servers/roles/__init__.py - 8 places > > > > -- > Thanks & Regards, > Pradip Parkale > Software Engineer | EnterpriseDB Corporation > -- *Thanks & Regards* *Akshay Joshi* *pgAdmin Hacker | Sr. Software Architect* *EDB Postgres * *Mobile: +91 976-788-8246* --000000000000e7adf805ae68408d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Pradip

Following are= the review comments:
  • ROLE_NOT_FOUND already in wrapped i= n gettext() then no need to use like gone(_(ROLE_NOT_FOUND)). In fact, can = we use
    self.not_found_error_msg()instead of new =
    constant.
  • Same with ERROR_FETCHING_ROLE_INFORMATION it's = already in gettext, also we can use this constant for string "
    Error retrieving roles from the database server= "

On Thu, Sep 3, 2020 at 4:30 PM Pradip Pa= rkale <pradip.parkale= @enterprisedb.com> wrote:
Hi Hackers,

Attached is a patch for removing duplicates string literals.
=C2=A0 =C2=A0 =C2=A0 =C2=A0 /server_groups/servers/roles/__init__.p= y =C2=A0- 8 places


--
Thanks & Regards,
Pradip= Parkale
Software Engineer | EnterpriseDB Corporation
<= /div>


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

<= /div>
--000000000000e7adf805ae68408d--