Skip to content

Commit

Permalink
pep8 style fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jsstylos committed Dec 15, 2016
1 parent d358373 commit f00d3f7
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 24 deletions.
4 changes: 2 additions & 2 deletions examples/alchemy_language_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
combined_operations = ['page-image', 'entity', 'keyword', 'title', 'author',
'taxonomy', 'concept', 'doc-emotion']
print(
json.dumps(alchemy_language.combined(url=url, extract=combined_operations),
indent=2))
json.dumps(alchemy_language.combined(url=url, extract=combined_operations),
indent=2))

# Get sentiment and emotion information results for detected entities/keywords:
# print(json.dumps(alchemy_language.entities(url=url, sentiment=True,
Expand Down
1 change: 0 additions & 1 deletion examples/discovery_v1.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# coding=utf-8
import watson_developer_cloud
import os, json

discovery = watson_developer_cloud.DiscoveryV1(
'2016-11-07',
Expand Down
3 changes: 2 additions & 1 deletion examples/language_translator_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
print(json.dumps(language_translator.get_models(), indent=2))

print(
json.dumps(language_translator.get_model('en-es-conversational'), indent=2))
json.dumps(language_translator.get_model('en-es-conversational'),
indent=2))

# delete custom model
# print(json.dumps(language_translator.delete_model(
Expand Down
4 changes: 2 additions & 2 deletions examples/text_to_speech_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
voice="en-US_AllisonVoice"))

print(
json.dumps(text_to_speech.pronunciation('Watson', pronunciation_format='spr'),
indent=2))
json.dumps(text_to_speech.pronunciation(
'Watson', pronunciation_format='spr'), indent=2))

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

Expand Down
48 changes: 30 additions & 18 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,18 @@
# Convert README.md to README.rst for pypi
try:
from pypandoc import convert
read_md = lambda f: convert(f, 'rst')

def read_md(f):
return convert(f, 'rst')

# read_md = lambda f: convert(f, 'rst')
except ImportError:
print('warning: pypandoc module not found, '
'could not convert Markdown to RST')
read_md = lambda f: open(f, 'rb').read().decode(encoding='utf-8')

def read_md(f):
return open(f, 'rb').read().decode(encoding='utf-8')
# read_md = lambda f: open(f, 'rb').read().decode(encoding='utf-8')


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


setup(name='watson-developer-cloud',
version=__version__,
description='Client library to use the IBM Watson Services',
Expand All @@ -65,23 +73,27 @@ def run_tests(self):
url='https://github.com/watson-developer-cloud/python-sdk',
packages=['watson_developer_cloud'],
keywords='alchemy datanews, language, vision, question and answer' +
' tone_analyzer, natural language classifier, retrieve and rank,' +
' tradeoff analytics, text to speech,' +
' language translation, language identification,' +
' concept expansion, machine translation, personality insights,' +
' message resonance, watson developer cloud, wdc, watson, ibm,' +
' dialog, user modeling, alchemyapi, alchemy, tone analyzer,' +
'speech to text, visual recognition',
' tone_analyzer, natural language classifier, retrieve and '
'rank,' +
' tradeoff analytics, text to speech,' +
' language translation, language identification,' +
' concept expansion, machine translation, personality '
'insights,' +
' message resonance, watson developer cloud, wdc, watson, '
'ibm,' +
' dialog, user modeling, alchemyapi, alchemy, tone analyzer,' +
'speech to text, visual recognition',
classifiers=[
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Libraries :: Application Frameworks',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Libraries :: Application '
'Frameworks',
],
zip_safe=True
)

0 comments on commit f00d3f7

Please sign in to comment.