Skip to content

Commit f00d3f7

Browse files
committed
pep8 style fixes
1 parent d358373 commit f00d3f7

5 files changed

Lines changed: 36 additions & 24 deletions

File tree

examples/alchemy_language_v1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
combined_operations = ['page-image', 'entity', 'keyword', 'title', 'author',
3939
'taxonomy', 'concept', 'doc-emotion']
4040
print(
41-
json.dumps(alchemy_language.combined(url=url, extract=combined_operations),
42-
indent=2))
41+
json.dumps(alchemy_language.combined(url=url, extract=combined_operations),
42+
indent=2))
4343

4444
# Get sentiment and emotion information results for detected entities/keywords:
4545
# print(json.dumps(alchemy_language.entities(url=url, sentiment=True,

examples/discovery_v1.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# coding=utf-8
22
import watson_developer_cloud
3-
import os, json
43

54
discovery = watson_developer_cloud.DiscoveryV1(
65
'2016-11-07',

examples/language_translator_v2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
print(json.dumps(language_translator.get_models(), indent=2))
1717

1818
print(
19-
json.dumps(language_translator.get_model('en-es-conversational'), indent=2))
19+
json.dumps(language_translator.get_model('en-es-conversational'),
20+
indent=2))
2021

2122
# delete custom model
2223
# print(json.dumps(language_translator.delete_model(

examples/text_to_speech_v1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
voice="en-US_AllisonVoice"))
1818

1919
print(
20-
json.dumps(text_to_speech.pronunciation('Watson', pronunciation_format='spr'),
21-
indent=2))
20+
json.dumps(text_to_speech.pronunciation(
21+
'Watson', pronunciation_format='spr'), indent=2))
2222

2323
print(json.dumps(text_to_speech.customizations(), indent=2))
2424

setup.py

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,18 @@
3434
# Convert README.md to README.rst for pypi
3535
try:
3636
from pypandoc import convert
37-
read_md = lambda f: convert(f, 'rst')
37+
38+
def read_md(f):
39+
return convert(f, 'rst')
40+
41+
# read_md = lambda f: convert(f, 'rst')
3842
except ImportError:
3943
print('warning: pypandoc module not found, '
4044
'could not convert Markdown to RST')
41-
read_md = lambda f: open(f, 'rb').read().decode(encoding='utf-8')
45+
46+
def read_md(f):
47+
return open(f, 'rb').read().decode(encoding='utf-8')
48+
# read_md = lambda f: open(f, 'rb').read().decode(encoding='utf-8')
4249

4350

4451
class PyTest(TestCommand):
@@ -52,6 +59,7 @@ def run_tests(self):
5259
errcode = pytest.main(self.test_args)
5360
sys.exit(errcode)
5461

62+
5563
setup(name='watson-developer-cloud',
5664
version=__version__,
5765
description='Client library to use the IBM Watson Services',
@@ -65,23 +73,27 @@ def run_tests(self):
6573
url='https://github.com/watson-developer-cloud/python-sdk',
6674
packages=['watson_developer_cloud'],
6775
keywords='alchemy datanews, language, vision, question and answer' +
68-
' tone_analyzer, natural language classifier, retrieve and rank,' +
69-
' tradeoff analytics, text to speech,' +
70-
' language translation, language identification,' +
71-
' concept expansion, machine translation, personality insights,' +
72-
' message resonance, watson developer cloud, wdc, watson, ibm,' +
73-
' dialog, user modeling, alchemyapi, alchemy, tone analyzer,' +
74-
'speech to text, visual recognition',
76+
' tone_analyzer, natural language classifier, retrieve and '
77+
'rank,' +
78+
' tradeoff analytics, text to speech,' +
79+
' language translation, language identification,' +
80+
' concept expansion, machine translation, personality '
81+
'insights,' +
82+
' message resonance, watson developer cloud, wdc, watson, '
83+
'ibm,' +
84+
' dialog, user modeling, alchemyapi, alchemy, tone analyzer,' +
85+
'speech to text, visual recognition',
7586
classifiers=[
76-
'Programming Language :: Python',
77-
'Programming Language :: Python :: 2',
78-
'Programming Language :: Python :: 3',
79-
'Development Status :: 4 - Beta',
80-
'Intended Audience :: Developers',
81-
'License :: OSI Approved :: Apache Software License',
82-
'Operating System :: OS Independent',
83-
'Topic :: Software Development :: Libraries :: Python Modules',
84-
'Topic :: Software Development :: Libraries :: Application Frameworks',
87+
'Programming Language :: Python',
88+
'Programming Language :: Python :: 2',
89+
'Programming Language :: Python :: 3',
90+
'Development Status :: 4 - Beta',
91+
'Intended Audience :: Developers',
92+
'License :: OSI Approved :: Apache Software License',
93+
'Operating System :: OS Independent',
94+
'Topic :: Software Development :: Libraries :: Python Modules',
95+
'Topic :: Software Development :: Libraries :: Application '
96+
'Frameworks',
8597
],
8698
zip_safe=True
8799
)

0 commit comments

Comments
 (0)