|
From: <lu...@us...> - 2015-02-18 17:35:53
|
Revision: 664
http://sourceforge.net/p/pyscard/code/664
Author: ludov
Date: 2015-02-18 17:35:50 +0000 (Wed, 18 Feb 2015)
Log Message:
-----------
colorize_line(): rewrite code
Avoid a long line and (try to) make the code easier to read.
Fix pep8:
parseATR.py:736:9: E128 continuation line under-indented for visual indent
parseATR.py:737:9: E128 continuation line under-indented for visual indent
Modified Paths:
--------------
trunk/contrib/parseATR/parseATR.py
Modified: trunk/contrib/parseATR/parseATR.py
===================================================================
--- trunk/contrib/parseATR/parseATR.py 2015-02-18 17:10:54 UTC (rev 663)
+++ trunk/contrib/parseATR/parseATR.py 2015-02-18 17:35:50 UTC (rev 664)
@@ -732,9 +732,9 @@
if isinstance(line, types.StringTypes):
return line
- template = line[0].replace("%s", left + "%s" +
- right).replace("%d", left + "%d" + right).replace("%g", left
- + "%g" + right)
+ template = line[0]
+ for text in ["%s", "%d", "%g"]:
+ template = template.replace(text, left + text + right)
flattened = template % line[1]
return flattened
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|