summaryrefslogtreecommitdiffstats
path: root/testsuites/vstf/vstf_scripts/vstf/common/pyhtml.py
diff options
context:
space:
mode:
authoryuyang <Gabriel.yuyang@huawei.com>2016-10-01 02:21:36 +0800
committeryuyang <Gabriel.yuyang@huawei.com>2016-10-01 02:23:53 +0800
commit6204bfbe6228d5167bdb67c42cac4c884cdcf664 (patch)
treeb67981719c8aa0542e040d70951bdb7aff044aad /testsuites/vstf/vstf_scripts/vstf/common/pyhtml.py
parent3ac496ac711f40f2a4c4fb0837758b4fbade43e4 (diff)
autopep8 fix for flake8
JIRA: BOTTLENECK-101 Using autopep8 to fix the python style scanned by flake8 Change-Id: I74bf28ed4d999dac3dd36e9101f099c9853a49b6 Signed-off-by: yuyang <Gabriel.yuyang@huawei.com>
Diffstat (limited to 'testsuites/vstf/vstf_scripts/vstf/common/pyhtml.py')
-rw-r--r--testsuites/vstf/vstf_scripts/vstf/common/pyhtml.py133
1 files changed, 118 insertions, 15 deletions
diff --git a/testsuites/vstf/vstf_scripts/vstf/common/pyhtml.py b/testsuites/vstf/vstf_scripts/vstf/common/pyhtml.py
index f3adee8d..b2162290 100644
--- a/testsuites/vstf/vstf_scripts/vstf/common/pyhtml.py
+++ b/testsuites/vstf/vstf_scripts/vstf/common/pyhtml.py
@@ -14,22 +14,124 @@ doc_type = '<!DOCTYPE HTML>\n'
default_title = "Html Page"
charset = '<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />\n'
-html4_tags = {'a', 'abbr', 'acronym', 'address', 'area', 'b', 'base', 'bdo', 'big',
- 'blockquote', 'body', 'br', 'button', 'caption', 'cite', 'code', 'col',
- 'colgroup', 'dd', 'del', 'div', 'dfn', 'dl', 'dt', 'em', 'fieldset',
- 'form', 'frame', 'frameset', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head',
- 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd',
- 'label', 'legend', 'li', 'link', 'map', 'menu', 'menuitem', 'meta',
- 'noframes', 'noscript', 'object', 'ol', 'optgroup', 'option', 'p',
- 'param', 'pre', 'q', 'samp', 'script', 'select', 'small', 'span', 'strong',
- 'style', 'sub', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th',
- 'thead', 'title', 'tr', 'tt', 'ul', 'var'}
+html4_tags = {
+ 'a',
+ 'abbr',
+ 'acronym',
+ 'address',
+ 'area',
+ 'b',
+ 'base',
+ 'bdo',
+ 'big',
+ 'blockquote',
+ 'body',
+ 'br',
+ 'button',
+ 'caption',
+ 'cite',
+ 'code',
+ 'col',
+ 'colgroup',
+ 'dd',
+ 'del',
+ 'div',
+ 'dfn',
+ 'dl',
+ 'dt',
+ 'em',
+ 'fieldset',
+ 'form',
+ 'frame',
+ 'frameset',
+ 'h1',
+ 'h2',
+ 'h3',
+ 'h4',
+ 'h5',
+ 'h6',
+ 'head',
+ 'hr',
+ 'html',
+ 'i',
+ 'iframe',
+ 'img',
+ 'input',
+ 'ins',
+ 'kbd',
+ 'label',
+ 'legend',
+ 'li',
+ 'link',
+ 'map',
+ 'menu',
+ 'menuitem',
+ 'meta',
+ 'noframes',
+ 'noscript',
+ 'object',
+ 'ol',
+ 'optgroup',
+ 'option',
+ 'p',
+ 'param',
+ 'pre',
+ 'q',
+ 'samp',
+ 'script',
+ 'select',
+ 'small',
+ 'span',
+ 'strong',
+ 'style',
+ 'sub',
+ 'sup',
+ 'table',
+ 'tbody',
+ 'td',
+ 'textarea',
+ 'tfoot',
+ 'th',
+ 'thead',
+ 'title',
+ 'tr',
+ 'tt',
+ 'ul',
+ 'var'}
disused_tags = {'isindex', 'font', 'dir', 's', 'strike',
'u', 'center', 'basefont', 'applet', 'xmp'}
-html5_tags = {'article', 'aside', 'audio', 'bdi', 'canvas', 'command', 'datalist', 'details',
- 'dialog', 'embed', 'figcaption', 'figure', 'footer', 'header',
- 'keygen', 'mark', 'meter', 'nav', 'output', 'progress', 'rp', 'rt', 'ruby',
- 'section', 'source', 'summary', 'details', 'time', 'track', 'video', 'wbr'}
+html5_tags = {
+ 'article',
+ 'aside',
+ 'audio',
+ 'bdi',
+ 'canvas',
+ 'command',
+ 'datalist',
+ 'details',
+ 'dialog',
+ 'embed',
+ 'figcaption',
+ 'figure',
+ 'footer',
+ 'header',
+ 'keygen',
+ 'mark',
+ 'meter',
+ 'nav',
+ 'output',
+ 'progress',
+ 'rp',
+ 'rt',
+ 'ruby',
+ 'section',
+ 'source',
+ 'summary',
+ 'details',
+ 'time',
+ 'track',
+ 'video',
+ 'wbr'}
nl = '\n'
tags = html4_tags | disused_tags | html5_tags
@@ -105,7 +207,8 @@ class Tag(list):
result = ''
if self.tag_name:
result += '<%s%s%s>' % (self.tag_name,
- self._render_attr(), self._self_close() * ' /')
+ self._render_attr(),
+ self._self_close() * ' /')
if not self._self_close():
isnl = True
for c in self: