Skip to content

Commit 5f5f6d9

Browse files
committed
Apply autopep8 and manual cleanup
Fixes #19
1 parent 2f7daf2 commit 5f5f6d9

File tree

11 files changed

+661
-529
lines changed

11 files changed

+661
-529
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ matrix:
1515
- python: pypy3.5
1616
dist: xenial
1717

18+
install:
19+
- pip install -r requirements.txt
20+
1821
script:
1922
- python setup.py build
2023
- python setup.py install
2124
- python -m pytest tests
25+
- flake8 src

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
setuptools>=38.6.0
22
pytest>=4.0.1
33
pytest-mock>=1.10.0
4+
flake8>=3.6.0

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
max-line-length = 80

src/itoolkit/__init__.py

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,37 @@
1-
# __all__ = ['itoolkit']
21
__version__ = "1.5.1"
3-
from .itoolkit import *
42

3+
from .itoolkit import iToolKit
4+
from .itoolkit import iCmd
5+
from .itoolkit import iCmd5250
6+
from .itoolkit import iSh
7+
from .itoolkit import iPgm
8+
from .itoolkit import iSrvPgm
9+
from .itoolkit import iRet
10+
from .itoolkit import iDS
11+
from .itoolkit import iData
12+
from .itoolkit import iSqlQuery
13+
from .itoolkit import iSqlExecute
14+
from .itoolkit import iSqlPrepare
15+
from .itoolkit import iSqlFetch
16+
from .itoolkit import iSqlFree
17+
from .itoolkit import iSqlParm
18+
from .itoolkit import iXml
19+
20+
__all__ = [
21+
'iToolKit',
22+
'iCmd',
23+
'iCmd5250',
24+
'iSh',
25+
'iPgm',
26+
'iSrvPgm',
27+
'iRet',
28+
'iDS',
29+
'iData',
30+
'iSqlQuery',
31+
'iSqlPrepare',
32+
'iSqlExecute',
33+
'iSqlFetch',
34+
'iSqlParm',
35+
'iSqlFree',
36+
'iXml',
37+
]

src/itoolkit/db2/idb2call.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"""
33
XMLSERVICE db2 call (QSQSRVR job)
44
5-
License:
5+
License:
66
BSD (LICENSE)
77
-- or --
88
http://yips.idevcloud.com/wiki/index.php/XMLService/LicenseXMLService
@@ -26,24 +26,27 @@
2626
from ..transport.database import DatabaseTransport
2727

2828
warnings.simplefilter('always', DeprecationWarning)
29-
warnings.warn("This module is deprecated, use itoolkit.transport.DatabaseTransport instead",
30-
category=DeprecationWarning,
31-
stacklevel=2)
29+
warnings.warn(
30+
"This module is deprecated,"
31+
" use itoolkit.transport.DatabaseTransport instead",
32+
category=DeprecationWarning,
33+
stacklevel=2)
3234
warnings.simplefilter('default', DeprecationWarning)
3335

34-
class iDB2Call(DatabaseTransport):
36+
37+
class iDB2Call(DatabaseTransport): # noqa N801
3538
"""
3639
Transport XMLSERVICE calls over DB2 connection.
3740
3841
Args:
3942
iuid (str): Database user profile name or database connection
4043
ipwd (str): optional - Database user profile password
4144
-- or --
42-
env var PASSWORD (export PASSWORD=mypass)
45+
env var PASSWORD (export PASSWORD=mypass)
4346
idb2 (str): optional - Database (WRKRDBDIRE *LOCAL)
44-
ictl (str): optional - XMLSERVICE control ['*here','*sbmjob']
45-
ipc (str): optional - XMLSERVICE xToolkit job route for *sbmjob ['/tmp/myunique42']
46-
isiz (int): optional - XMLSERVICE expected max XML output size, required for DB2
47+
ictl (str): optional - XMLSERVICE control ['*here','*sbmjob']
48+
ipc (str): optional - XMLSERVICE route for *sbmjob '/tmp/myunique'
49+
isiz (int): optional - XMLSERVICE expected max XML output size
4750
ilib (str): optional - XMLSERVICE library compiled (default QXMLSERV)
4851
4952
Example:

0 commit comments

Comments
 (0)