Commit 0391220a authored by Arnaud Fontaine's avatar Arnaud Fontaine

Cosmetic: Fix Pylint warnings.

parent 519f7480
...@@ -20,15 +20,15 @@ def dumpWorkflowChain(self): ...@@ -20,15 +20,15 @@ def dumpWorkflowChain(self):
ti = workflow_tool._listTypeInfo() ti = workflow_tool._listTypeInfo()
types_info = [] types_info = []
for t in ti: for t in ti:
id = t.getId() id_ = t.getId()
title = t.Title() title = t.Title()
if title == id: if title == id_:
title = None title = None
if cbt is not None and cbt.has_key(id): if cbt is not None and cbt.has_key(id_):
chain = sorted(cbt[id]) chain = sorted(cbt[id_])
else: else:
chain = ['(Default)'] chain = ['(Default)']
types_info.append({'id': id, types_info.append({'id': id_,
'title': title, 'title': title,
'chain': chain}) 'chain': chain})
output = [] output = []
...@@ -94,7 +94,7 @@ def MessageCatalog_deleteNotTranslatedMessageDict(self): ...@@ -94,7 +94,7 @@ def MessageCatalog_deleteNotTranslatedMessageDict(self):
Delete from Localizer's MessageCatalog instance messages that are NOT translated. Delete from Localizer's MessageCatalog instance messages that are NOT translated.
""" """
not_translated_message_dict = MessageCatalog_getNotTranslatedMessageDict(self) not_translated_message_dict = MessageCatalog_getNotTranslatedMessageDict(self)
for k,v in not_translated_message_dict.iteritems(): for k,_ in not_translated_message_dict.iteritems():
# delete message from dict # delete message from dict
del(self._messages[k]) del(self._messages[k])
return len(not_translated_message_dict.keys()) return len(not_translated_message_dict.keys())
...@@ -117,7 +117,7 @@ def checkConversionToolAvailability(self): ...@@ -117,7 +117,7 @@ def checkConversionToolAvailability(self):
try: try:
temp_document = newTempOOoDocument(self, document_id, data=document_file.data, source_reference=document_id) temp_document = newTempOOoDocument(self, document_id, data=document_file.data, source_reference=document_id)
temp_document.convertToBaseFormat() temp_document.convertToBaseFormat()
mimetype, html_result = temp_document.convert(format='html') _, html_result = temp_document.convert(format='html')
except ConflictError: except ConflictError:
raise raise
except: #Which Errors should we catch ? except: #Which Errors should we catch ?
......
...@@ -6,10 +6,22 @@ ...@@ -6,10 +6,22 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>ERP5Administration</string> </value> <value> <string>ERP5Administration</string> </value>
</item> </item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item> <item>
<key> <string>id</string> </key> <key> <string>id</string> </key>
<value> <string>extension.erp5.ERP5Administration</string> </value> <value> <string>extension.erp5.ERP5Administration</string> </value>
...@@ -24,6 +36,20 @@ ...@@ -24,6 +36,20 @@
<none/> <none/>
</value> </value>
</item> </item>
<item>
<key> <string>text_content_error_message</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 88, 29: map/filter on lambda could be replaced by comprehension (deprecated-lambda)</string>
</tuple>
</value>
</item>
<item> <item>
<key> <string>version</string> </key> <key> <string>version</string> </key>
<value> <string>erp5</string> </value> <value> <string>erp5</string> </value>
...@@ -31,13 +57,28 @@ ...@@ -31,13 +57,28 @@
<item> <item>
<key> <string>workflow_history</string> </key> <key> <string>workflow_history</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="PersistentMapping" module="Persistence.mapping"/> <global name="PersistentMapping" module="Persistence.mapping"/>
</pickle> </pickle>
...@@ -50,7 +91,7 @@ ...@@ -50,7 +91,7 @@
<item> <item>
<key> <string>component_validation_workflow</string> </key> <key> <string>component_validation_workflow</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -59,7 +100,7 @@ ...@@ -59,7 +100,7 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="3" aka="AAAAAAAAAAM="> <record id="4" aka="AAAAAAAAAAQ=">
<pickle> <pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/> <global name="WorkflowHistoryList" module="Products.ERP5Type.patches.WorkflowTool"/>
</pickle> </pickle>
...@@ -72,33 +113,6 @@ ...@@ -72,33 +113,6 @@
<key> <string>action</string> </key> <key> <string>action</string> </key>
<value> <string>validate</string> </value> <value> <string>validate</string> </value>
</item> </item>
<item>
<key> <string>actor</string> </key>
<value> <string>ERP5TypeTestCase</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>time</string> </key>
<value>
<object>
<klass>
<global name="DateTime" module="DateTime.DateTime"/>
</klass>
<tuple>
<none/>
</tuple>
<state>
<tuple>
<float>1377844543.44</float>
<string>GMT+9</string>
</tuple>
</state>
</object>
</value>
</item>
<item> <item>
<key> <string>validation_state</string> </key> <key> <string>validation_state</string> </key>
<value> <string>validated</string> </value> <value> <string>validated</string> </value>
......
2014-02-24 arnaud.fontaine
* Cosmetic: Fix Pylint warnings.
2014-02-24 arnaud.fontaine 2014-02-24 arnaud.fontaine
* Use Pylint to check source code to unify ZODB Components and Python Script source code checking. * Use Pylint to check source code to unify ZODB Components and Python Script source code checking.
......
159 160
\ No newline at end of file \ No newline at end of file
...@@ -53,8 +53,7 @@ ...@@ -53,8 +53,7 @@
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
import re\n import re\n
message_re = re.compile(\'[CRWEF]:\\s*(?P<line>\\d+),\\s*(?P<column>\\d+):\\s*.*\')\n message_re = re.compile(r\'[CRWEF]:\\s*(?P<line>\\d+),\\s*(?P<column>\\d+):\\s*.*\')\n
error_warning_dict = {\'error_list\': [], \'warning_list\': []}\n
\n \n
def getParsedMessageList(message_list):\n def getParsedMessageList(message_list):\n
result_list = []\n result_list = []\n
......
2014-02-24 arnaud.fontaine
* Cosmetic: Fix Pylint warnings.
2014-02-24 arnaud.fontaine 2014-02-24 arnaud.fontaine
* Follow API changes to unify ZODB Components and Python Script source code checking. * Follow API changes to unify ZODB Components and Python Script source code checking.
......
41153 41154
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment