[trunk/7.0] Error E0602 Undefined variable with pylint

Bug #1228821 reported by Moisés López - http://www.vauxoo.com
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Low
OpenERP R&D Addons Team 3
7.0
Fix Committed
Low
OpenERP Publisher's Warranty Team

Bug Description

We execute a global pylint script in addons and filter E0602 Undefined variable and we get this:

******70-addons/document_webdav/test_davclient.py
******* Module document_webdav.test_davclient
E0602: 58,8:PersistentTransport.__init__: Undefined variable 'log'
******70-addons/report_webkit/webkit_report.py
******* Module report_webkit.webkit_report
E0602: 64,19:WebKitParser: Undefined variable 'report_sxw'
E0602: 72,8:WebKitParser.__init__: Undefined variable 'report_sxw'
******70-addons/account_followup/report/account_followup_print.py
******* Module account_followup.report.account_followup_print
E0602: 86,18:report_rappel._get_text: Undefined variable 'osv'
E0602: 86,33:report_rappel._get_text: Undefined variable '_'
E0602: 86,45:report_rappel._get_text: Undefined variable '_'
******70-addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py
******* Module script.ConvertFieldsToBraces
E0602: 60,4: Undefined variable 'g_ImplementationHelper'
******70-addons/base_report_designer/plugin/openerp_report_designer/bin/script/About.py
******* Module script.About
E0602: 86,4: Undefined variable 'g_ImplementationHelper'
******70-addons/base_report_designer/plugin/openerp_report_designer/bin/script/Expression.py
******* Module script.Expression
E0602: 38,8:Expression.__init__: Undefined variable 'LoginTest'
E0602: 91,4: Undefined variable 'g_ImplementationHelper'
******70-addons/base_report_designer/plugin/openerp_report_designer/bin/script/NewReport.py
******* Module script.NewReport
E0602: 93,4: Undefined variable 'g_ImplementationHelper'
******70-addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/functions.py
******* Module script.lib.functions
E0602: 47,24:genTree: Undefined variable 'url'
******70-addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py
******* Module script.lib.tools
E0602: 26,11:get_absolute_file_path: Undefined variable 'os'
******70-addons/account/report/account_print_overdue.py
******* Module account.report.account_print_overdue
E0602: 45,16:Overdue._tel_get: Undefined variable 'res_partner_address'
******70-addons/account/wizard/account_financial_report.py
******* Module account.wizard.account_financial_report
E0602: 71,37:accounting_report._build_comparison_context: Undefined variable '_'
E0602: 71,49:accounting_report._build_comparison_context: Undefined variable '_'
******70-addons/document_ftp/ftpserver/authorizer.py
******* Module document_ftp.ftpserver.authorizer
E0602: 51,18:authorizer.has_perm: Undefined variable 'pooler'
E0602: 52,14:authorizer.has_perm: Undefined variable 'security'
******70-addons/mrp_repair/wizard/make_invoice.py
******* Module mrp_repair.wizard.make_invoice
E0602: 60,46:make_invoice.make_invoices: Undefined variable 'Fals'

Tags: maintenance

Related branches

Revision history for this message
Moisés López - http://www.vauxoo.com (moylop260) wrote :

Side server we get this:
************../server/openerp/addons/base/module/wizard/base_module_scan.py
************* Module openerp.addons.base.module.wizard.base_module_scan
E0602: 40,19:base_module_scan.watch_dir: Undefined variable 'module_name_re'

Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Changed in openobject-addons:
assignee: OpenERP Publisher's Warranty Team (openerp-opw) → nobody
Revision history for this message
Amit Dodiya (OpenERP) (ado-openerp) wrote :

Hello,

This issue is fixed with following branch:
For Addons:
branch: lp:~openerp-dev/openobject-addons/7.0-opw-598208-ado
revision-id: <email address hidden>
revision-no: 9526

For Server:
branch: lp:~openerp-dev/openobject-server/7.0-opw-598208-ado
revision-id: <email address hidden>
revision-no: 5120

Soon our experts will review and merge it with stable branches.

Regards,
Amit

Changed in openobject-addons:
status: New → In Progress
status: In Progress → Fix Committed
status: Fix Committed → New
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 1 (openerp-dev-addons1)
importance: Undecided → Low
status: New → Confirmed
summary: - [7.0] Error E0602 Undefined variable with pylint
+ [trunk/7.0] Error E0602 Undefined variable with pylint
Revision history for this message
Xavier ALT (dex-phx) wrote :

Hi,

For server part, it's fixed with revision-id: <email address hidden> - basically old unused file that should not be here anymore. Addons will follow...

Regards,

Changed in openobject-addons:
assignee: OpenERP R&D Addons Team 1 (openerp-dev-addons1) → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
Revision history for this message
Moisés López - http://www.vauxoo.com (moylop260) wrote :
Download full text (6.5 KiB)

Hello,
We make a new pylint script with only
pylint --msg-template="{path}:{line}: [{msg_id}({symbol}), {obj}] {msg}" -d all -e E0601 -e E1124 -e E0602 -e E1306 -e E0101 ./static/openerp-dev-7-0-944/server/openerp

The result was:
************* Module openerp.report.render.rml2txt.rml2txt
static/openerp-dev-7-0-943/server/openerp/report/render/rml2txt/rml2txt.py:401: [E0602(undefined-variable), _rml_template.set_next_template] Undefined variable 'name'
************* Module openerp.report.render.rml2html.rml2html
static/openerp-dev-7-0-943/server/openerp/report/render/rml2html/rml2html.py:308: [E0602(undefined-variable), _rml_template.set_next_template] Undefined variable 'name'
************* Module openerp.tools.amount_to_text_en
static/openerp-dev-7-0-943/server/openerp/tools/amount_to_text_en.py:127: [E0602(undefined-variable), ] Undefined variable 'int_to_text'
static/openerp-dev-7-0-943/server/openerp/tools/amount_to_text_en.py:129: [E0602(undefined-variable), ] Undefined variable 'int_to_text'
static/openerp-dev-7-0-943/server/openerp/tools/amount_to_text_en.py:131: [E0602(undefined-variable), ] Undefined variable 'int_to_text'
************* Module openerp.addons.resource.faces.task
static/openerp-dev-7-0-943/server/openerp/addons/resource/faces/task.py:970: [E0602(undefined-variable), VariableLoad] Undefined variable 'me'
static/openerp-dev-7-0-943/server/openerp/addons/resource/faces/task.py:1285: [E0601(used-before-assignment), SloppyAllocator.test_allocation_length] Using variable 'start' before assignment
static/openerp-dev-7-0-943/server/openerp/addons/resource/faces/task.py:1483: [E0602(undefined-variable), YearlyMax] Undefined variable 'me'
static/openerp-dev-7-0-943/server/openerp/addons/resource/faces/task.py:1505: [E0602(undefined-variable), WeeklyMax] Undefined variable 'me'
static/openerp-dev-7-0-943/server/openerp/addons/resource/faces/task.py:1527: [E0602(undefined-variable), MonthlyMax] Undefined variable 'me'
static/openerp-dev-7-0-943/server/openerp/addons/resource/faces/task.py:1549: [E0602(undefined-variable), DailyMax] Undefined variable 'me'
static/openerp-dev-7-0-943/server/openerp/addons/resource/faces/task.py:2323: [E0601(used-before-assignment), Task._convert_performed] Using variable 'last_end' before assignment
static/openerp-dev-7-0-943/server/openerp/addons/resource/faces/task.py:2325: [E0601(used-before-assignment), Task._convert_performed] Using variable 'last_index' before assignment
************* Module openerp.addons.resource.faces.resource
static/openerp-dev-7-0-943/server/openerp/addons/resource/faces/resource.py:749: [E0602(undefined-variable), _ResourceGroup._permutation_count] Undefined variable 'abstract'
static/openerp-dev-7-0-943/server/openerp/addons/resource/faces/resource.py:777: [E0602(undefined-variable), _ResourceGroup.__str__] Undefined variable 'lower'
************* Module openerp.addons.document_ftp.ftpserver.abstracted_fs
static/openerp-dev-7-0-943/server/openerp/addons/document_ftp/ftpserver/abstracted_fs.py:194: [E0602(undefined-variable), abstracted_fs.mkstemp] Undefined variable 'node'
************* Module openerp.addons.document_ftp.ftpserver.authorizer
static/openerp-dev-7-0-943...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.