Skip to content

Commit e71bf64

Browse files
Merge pull request #59 from Hema-Mathiyazhagan/flake8
flake8 modifications
2 parents dc47e40 + 2582584 commit e71bf64

File tree

13 files changed

+2414
-1486
lines changed

13 files changed

+2414
-1486
lines changed

nzpy/__init__.py

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
from nzpy.core import (
2-
Warning, DataError, DatabaseError, InterfaceError, ProgrammingError,
3-
Error, OperationalError, IntegrityError, InternalError, NotSupportedError,
4-
ArrayContentNotHomogenousError, ArrayDimensionsNotConsistentError,
5-
ArrayContentNotSupportedError, Connection, Cursor, Binary, Date,
6-
DateFromTicks, Time, TimeFromTicks, Timestamp, TimestampFromTicks, BINARY,
7-
Interval, PGEnum, PGJson, PGJsonb, PGTsvector, PGText, PGVarchar, LogOptions)
1+
from nzpy.core import (ArrayContentNotHomogenousError,
2+
ArrayContentNotSupportedError,
3+
ArrayDimensionsNotConsistentError, BINARY,
4+
Binary, Connection, Cursor, DataError,
5+
DatabaseError, Date, DateFromTicks, Error,
6+
IntegrityError, InterfaceError, InternalError,
7+
Interval, LogOptions, NotSupportedError,
8+
OperationalError, PGEnum, PGJson, PGJsonb,
9+
PGText, PGTsvector, PGVarchar, ProgrammingError,
10+
Time, TimeFromTicks, Timestamp, TimestampFromTicks,
11+
Warning)
12+
813
from ._version import get_versions
14+
915
__version__ = get_versions()['version']
1016
del get_versions
1117

@@ -40,19 +46,22 @@
4046
__author__ = "Mathieu Fenniak"
4147

4248

43-
def connect(
44-
user, host='localhost', unix_sock=None, port=5432, database=None,
45-
password=None, ssl=None, securityLevel= 0, timeout=None, application_name=None,
46-
max_prepared_statements=1000, datestyle = 'ISO', logLevel = 0, tcp_keepalive=True, char_varchar_encoding='latin', logOptions=LogOptions.Inherit, pgOptions=None):
49+
def connect(user, host='localhost', unix_sock=None, port=5432, database=None,
50+
password=None, ssl=None, securityLevel=0, timeout=None,
51+
application_name=None, max_prepared_statements=1000,
52+
datestyle='ISO', logLevel=0, tcp_keepalive=True,
53+
char_varchar_encoding='latin', logOptions=LogOptions.Inherit,
54+
pgOptions=None):
4755

48-
return Connection(
49-
user, host, unix_sock, port, database, password, ssl, securityLevel, timeout,
50-
application_name, max_prepared_statements, datestyle, logLevel, tcp_keepalive,char_varchar_encoding, logOptions, pgOptions)
56+
return Connection(user, host, unix_sock, port, database, password, ssl,
57+
securityLevel, timeout, application_name,
58+
max_prepared_statements, datestyle, logLevel,
59+
tcp_keepalive, char_varchar_encoding,
60+
logOptions, pgOptions)
5161

5262

5363
apilevel = "2.0"
5464
"""The DBAPI level supported, currently "2.0".
55-
5665
This property is part of the `DBAPI 2.0 specification
5766
<http://www.python.org/dev/peps/pep-0249/>`_.
5867
"""
@@ -62,7 +71,6 @@ def connect(
6271
supports. This DBAPI module supports sharing of the module only. Connections
6372
and cursors my not be shared between threads. This gives nzpy a threadsafety
6473
value of 1.
65-
6674
This property is part of the `DBAPI 2.0 specification
6775
<http://www.python.org/dev/peps/pep-0249/>`_.
6876
"""
@@ -99,6 +107,5 @@ def connect(
99107
PGTsvector, PGText, PGVarchar]
100108

101109
"""Version string for nzpy.
102-
103110
.. versionadded:: 1.9.11
104111
"""

0 commit comments

Comments
 (0)