Re: [pgAdmin][SonarQube] Cognitive complexity roles + test cases

2020-08-27 Thread Akshay Joshi
Thanks, patch applied. On Thu, Aug 27, 2020 at 12:49 PM Aditya Toshniwal < aditya.toshni...@enterprisedb.com> wrote: > Hi Hackers, > > Attached is the patch to reduce the cognitive complexity for > validate_request function in roles module from 258 to 15. I've also added a > few more test scenari

[pgAdmin][SonarQube] Cognitive complexity roles + test cases

2020-08-27 Thread Aditya Toshniwal
Hi Hackers, Attached is the patch to reduce the cognitive complexity for validate_request function in roles module from 258 to 15. I've also added a few more test scenarios in the roles RE-SQL test cases to make sure the changes are tested. Please review. -- Thanks, Aditya Toshniwal pgAdmin hac

Re: [pgAdmin][SonarQube] Cognitive complexity

2020-08-25 Thread Akshay Joshi
Thanks, patch applied. On Tue, Aug 25, 2020 at 4:09 PM Aditya Toshniwal < aditya.toshni...@enterprisedb.com> wrote: > Hi Hackers, > > The previous commit caused a regression in taking backup of table. DB and > schema backup worked fine. > Attached patch fixes the regression. > I've also added mor

Re: [pgAdmin][SonarQube] Cognitive complexity

2020-08-25 Thread Aditya Toshniwal
Hi Hackers, The previous commit caused a regression in taking backup of table. DB and schema backup worked fine. Attached patch fixes the regression. I've also added more test scenarios in backup test cases covering table and schema backups to catch the failure earlier. On Tue, Aug 25, 2020 at 12

Re: [pgAdmin][SonarQube]: Cognitive complexity

2020-08-25 Thread Akshay Joshi
Thanks, patch applied. On Mon, Aug 24, 2020 at 4:47 PM Pradip Parkale < pradip.park...@enterprisedb.com> wrote: > Hi Akshay, > Please find the updated patch. > > On Fri, Aug 21, 2020 at 11:53 AM Akshay Joshi < > akshay.jo...@enterprisedb.com> wrote: > >> Hi Pradip >> >> Following are the review c

Re: [pgAdmin][SonarQube] Cognitive complexity

2020-08-25 Thread Akshay Joshi
Thanks, patch applied. On Tue, Aug 25, 2020 at 12:32 PM Aditya Toshniwal < aditya.toshni...@enterprisedb.com> wrote: > Hi Akshay, > > Attached is the updated patch. > > On Tue, Aug 25, 2020 at 11:38 AM Akshay Joshi < > akshay.jo...@enterprisedb.com> wrote: > >> Hi Aditya >> >> Please fix the foll

Re: [pgAdmin][SonarQube] Cognitive complexity

2020-08-25 Thread Aditya Toshniwal
Hi Akshay, Attached is the updated patch. On Tue, Aug 25, 2020 at 11:38 AM Akshay Joshi wrote: > Hi Aditya > > Please fix the following issues: > >- Add docstrings to the newly created functions. >- Fix PEP8 issue. > > > > On Mon, Aug 24, 2020 at 5:02 PM Aditya Toshniwal < > aditya.tosh

Re: [pgAdmin][SonarQube] Cognitive complexity

2020-08-24 Thread Akshay Joshi
Hi Aditya Please fix the following issues: - Add docstrings to the newly created functions. - Fix PEP8 issue. On Mon, Aug 24, 2020 at 5:02 PM Aditya Toshniwal < aditya.toshni...@enterprisedb.com> wrote: > Hi Hackers, > > Attached patch reduces the cognitive complexity of functions for b

[pgAdmin][SonarQube] Cognitive complexity

2020-08-24 Thread Aditya Toshniwal
Hi Hackers, Attached patch reduces the cognitive complexity of functions for below: web/.../schemas/packages/edbfuncs/__init__.py 21 to 15 web/.../databases/schemas/types/__init__.py 39 to 15; 80 to 15 web/.../server_groups/servers/pgagent/__init__.py 39 to 15 web/pgadmin/misc/bgprocess/process_ex

Re: [pgAdmin][SonarQube]: Cognitive complexity

2020-08-24 Thread Pradip Parkale
Hi Akshay, Please find the updated patch. On Fri, Aug 21, 2020 at 11:53 AM Akshay Joshi wrote: > Hi Pradip > > Following are the review comments: > >- Change the function name to "_get_supported_browser" instead of >"_get_browser_supported". > > Fixed. > >- Added docstring to the fu

Re: [pgAdmin][SonarQube]: Cognitive complexity

2020-08-20 Thread Akshay Joshi
Hi Pradip Following are the review comments: - Change the function name to "_get_supported_browser" instead of "_get_browser_supported". - Added docstring to the functions in below format: """ :param trans_id: :param session_obj: :param diff_model_obj: :return: """ - Can we make

Re: [pgAdmin][SonarQube]: Cognitive complexity

2020-08-20 Thread Pradip Parkale
Please ignore the previous patch, find the updated patch in this mail. On Thu, Aug 20, 2020 at 8:52 PM Pradip Parkale < pradip.park...@enterprisedb.com> wrote: > Hi Hackers, > > The attached patch will reduce cognitive complexity for the following > functions. > >1. web/.../databases/schemas/

[pgAdmin][SonarQube]: Cognitive complexity

2020-08-20 Thread Pradip Parkale
Hi Hackers, The attached patch will reduce cognitive complexity for the following functions. 1. web/.../databases/schemas/domains/__init__.py - 16 to 15. 2. web/.../tables/row_security_policies/__init__.py - 17 to 15. 3. web/pgadmin/tools/debugger/__init__.py - 23 to 15 4. user_mappin