From 73cf925b3ba8167610e45287ec7194b721ddf351 Mon Sep 17 00:00:00 2001 From: Karen Bradshaw Date: Mon, 30 Nov 2015 14:03:19 -0500 Subject: [PATCH] Pep8 fixes. --- fairy_slipper/cmd/docbkx_to_json.py | 4 ++-- fairy_slipper/cmd/wadl_to_swagger.py | 2 +- fairy_slipper/tests/cmd/test_wadl_to_swagger.py | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/fairy_slipper/cmd/docbkx_to_json.py b/fairy_slipper/cmd/docbkx_to_json.py index 06d9e90..f897b5a 100644 --- a/fairy_slipper/cmd/docbkx_to_json.py +++ b/fairy_slipper/cmd/docbkx_to_json.py @@ -549,7 +549,7 @@ class APIChapterContentHandler(xml.sax.ContentHandler, TableMixin): content = ' ``' if self.content: if self.content[-1].endswith('(') or \ - self.content[-1].endswith(' '): + self.content[-1].endswith(' '): content = '``' content += ' '.join(self.inline_markup_stack[0:None]) content += '``' @@ -567,7 +567,7 @@ class APIChapterContentHandler(xml.sax.ContentHandler, TableMixin): content = ' ' + self.EMPHASIS[self.current_emphasis] if self.content: if self.content[-1].endswith('(') or \ - self.content[-1].endswith(' '): + self.content[-1].endswith(' '): content = '' + self.EMPHASIS[self.current_emphasis] content += ' '.join(self.inline_markup_stack[0:None]) content += self.EMPHASIS[self.current_emphasis] diff --git a/fairy_slipper/cmd/wadl_to_swagger.py b/fairy_slipper/cmd/wadl_to_swagger.py index 8dd0888..093836d 100644 --- a/fairy_slipper/cmd/wadl_to_swagger.py +++ b/fairy_slipper/cmd/wadl_to_swagger.py @@ -448,7 +448,7 @@ class ParaParser(SubParser, TableMixin): content = ' ' + self.EMPHASIS[self.current_emphasis] if self.content: if self.content[-1].endswith('(') or \ - self.content[-1].endswith(' '): + self.content[-1].endswith(' '): content = '' + self.EMPHASIS[self.current_emphasis] content += ' '.join(self.inline_markup_stack[0:None]) content += self.EMPHASIS[self.current_emphasis] diff --git a/fairy_slipper/tests/cmd/test_wadl_to_swagger.py b/fairy_slipper/tests/cmd/test_wadl_to_swagger.py index fe6d2ee..8639465 100644 --- a/fairy_slipper/tests/cmd/test_wadl_to_swagger.py +++ b/fairy_slipper/tests/cmd/test_wadl_to_swagger.py @@ -562,7 +562,8 @@ class TestWADLHandler(unittest.TestCase): 'responses': {'202': {'examples': {}, 'headers': {}, 'schema': { - '$ref': '#/definitions/createThing_202'}, + '$ref': + '#/definitions/createThing_202'}, 'description': ''}}, 'summary': 'Creates and uses a port interface ' 'to attach the port to a server instance.', @@ -581,7 +582,7 @@ class TestWADLHandler(unittest.TestCase): 'required': True, 'type': 'string'}}, 'type': 'object'}, - 'createThing_202': + 'createThing_202': {'properties': {'thing-a-imagig-response': {'description':