Re: [pgAdmin4][RM#3082] Fix PEP-8 issues

From: Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][RM#3082] Fix PEP-8 issues
Date: 2018-02-08 18:10:19
Message-ID: CAKKotZQvyzias+C2mNFkbhbaOn3Dxyg20+ha9LVHJBmicbmRLg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Dave,

PFA updated patch.

On Mon, Feb 5, 2018 at 7:55 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:

> Hi
>
> On Fri, Feb 2, 2018 at 5:46 PM, Murtuza Zabuawala <
> murtuza(dot)zabuawala(at)enterprisedb(dot)com> wrote:
>
>> Hi,
>>
>> PFA patch to fix PEP-8 issues in feature_tests, dashboard, about and misc
>> module's python code.
>>
>> To verify the changes,
>> 1) activate virtual environemt
>> 2) Navigate to ../web directory and run following
>> pycodestyle --config=.pycodestyle ./pgadmin/misc/
>> pycodestyle --config=.pycodestyle ./pgadmin/about/
>> pycodestyle --config=.pycodestyle ./pgadmin/dashboard/
>> pycodestyle --config=.pycodestyle ./pgadmin/feature_tests/
>>
>
> I seem to be getting the following failure pretty consistently with this
> patch applied:
>
> ======================================================================
> ERROR: runTest (pgadmin.feature_tests.pg_data
> type_validation_test.PGDataypeFeatureTest)
> Test checks for PG data-types output
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/pg_datatype_validation_test.py",
> line 135, in runTest
> self._check_datatype()
> File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/pg_datatype_validation_test.py",
> line 161, in _check_datatype
> query = self.construct_select_query(batch)
> File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/pg_datatype_validation_test.py",
> line 214, in construct_select_query
> if not self._is_datatype_available_in_current_database(datatype):
> File "/Users/dpage/git/pgadmin4/web/pgadmin/feature_tests/pg_datatype_validation_test.py",
> line 252, in _is_datatype_available_in_current_database
> valid_version = self.database_version >= type_minimum_version[datatype]
> KeyError: u''
>

Fixed

>
> ----------------------------------------------------------------------
> Ran 10 tests in 209.730s
>
> FAILED (errors=1, skipped=1)
>
> ======================================================================
> Test Result Summary
> ======================================================================
>
> Regression - PG 10:
>
> 8 tests passed
> 1 test failed:
> PGDataypeFeatureTest (Test checks for PG data-types output)
> 1 test skipped:
> CheckDebuggerForXssFeatureTest (Tests to check if Debugger is vulnerable
> to XSS)
>
> ======================================================================
>
> I also got the following whilst testing:
>
> (pgadmin4)piranha:web dpage$ pycodestyle --config=.pycodestyle
> ./pgadmin/feature_tests/
> ./pgadmin/feature_tests/keyboard_shortcut_test.py:33: [E501] line too
> long (95 > 79 characters)
> ./pgadmin/feature_tests/keyboard_shortcut_test.py:34: [E501] line too
> long (95 > 79 characters)
> ./pgadmin/feature_tests/keyboard_shortcut_test.py:42: [E501] line too
> long (87 > 79 characters)
> ./pgadmin/feature_tests/keyboard_shortcut_test.py:51: [E501] line too
> long (114 > 79 characters)
> ./pgadmin/feature_tests/keyboard_shortcut_test.py:54: [E501] line too
> long (90 > 79 characters)
> ./pgadmin/feature_tests/keyboard_shortcut_test.py:69: [E501] line too
> long (91 > 79 characters)
> ./pgadmin/feature_tests/keyboard_shortcut_test.py:75: [E501] line too
> long (89 > 79 characters)
> ./pgadmin/feature_tests/keyboard_shortcut_test.py:82: [E501] line too
> long (100 > 79 characters)
> ./pgadmin/feature_tests/keyboard_shortcut_test.py:90: [E501] line too
> long (86 > 79 characters)
> ./pgadmin/feature_tests/keyboard_shortcut_test.py:95: [W391] blank line
> at end of file
> 9 E501 line too long (95 > 79 characters)
> 1 W391 blank line at end of file
> 10
>

​This file was added after I sent the patch :)​

​BTW I have the issues now.​

>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

Attachment Content-Type Size
fix_PEP8_v1.diff text/plain 94.7 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Khushboo Vashi 2018-02-09 04:12:54 Re: [pgAdmin4][Patch]: RM #2899: Provide access keys/shortcuts to all commonly used menu options in the main window.
Previous Message Murtuza Zabuawala 2018-02-08 18:04:19 Re: [pgAdmin4][RM#2901] Make shortcuts configurable in Debugger