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

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com>
Cc: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][RM#3082] Fix PEP-8 issues
Date: 2018-02-05 14:25:48
Message-ID: CA+OCxoxMRS3Pc+MkbSSOicjUc-bqGJmUFtSstSqcd4bce7QOmQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

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_datatype_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''

----------------------------------------------------------------------
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

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2018-02-05 15:32:18 pgAdmin 4 commit: Rewrite the runtime as a tray-based server which can
Previous Message Dave Page 2018-02-05 09:31:05 Re: pgAdmin 4 commit: Don't quote variable values used by SET. It's usually