[IMP] test_pylint: check for python3 incompatibilities
Cherry-pick of 9882f24313
This commit is contained in:
@@ -507,6 +507,7 @@ class Module(models.Model):
|
||||
|
||||
self._cr.commit()
|
||||
env = api.Environment(self._cr, self._uid, self._context)
|
||||
# pylint: disable=next-method-called
|
||||
config = env['ir.module.module'].next() or {}
|
||||
if config.get('type') not in ('ir.actions.act_window_close',):
|
||||
return config
|
||||
|
||||
@@ -79,4 +79,5 @@ class BaseModuleUpgrade(models.TransientModel):
|
||||
|
||||
@api.multi
|
||||
def config(self):
|
||||
# pylint: disable=next-method-called
|
||||
return self.env['res.config'].next()
|
||||
|
||||
@@ -53,9 +53,9 @@ class ResConfigConfigurable(models.TransientModel):
|
||||
'''
|
||||
_name = 'res.config'
|
||||
|
||||
|
||||
@api.multi
|
||||
def start(self):
|
||||
# pylint: disable=next-method-called
|
||||
return self.next()
|
||||
|
||||
@api.multi
|
||||
@@ -105,6 +105,7 @@ class ResConfigConfigurable(models.TransientModel):
|
||||
an action dictionary -- executes the action provided by calling
|
||||
``next``.
|
||||
"""
|
||||
# pylint: disable=next-method-called
|
||||
return self.execute() or self.next()
|
||||
|
||||
@api.multi
|
||||
@@ -116,6 +117,7 @@ class ResConfigConfigurable(models.TransientModel):
|
||||
an action dictionary -- executes the action provided by calling
|
||||
``next``.
|
||||
"""
|
||||
# pylint: disable=next-method-called
|
||||
return self.cancel() or self.next()
|
||||
|
||||
@api.multi
|
||||
@@ -130,6 +132,7 @@ class ResConfigConfigurable(models.TransientModel):
|
||||
an action dictionary -- executes the action provided by calling
|
||||
``next``.
|
||||
"""
|
||||
# pylint: disable=next-method-called
|
||||
return self.cancel() or self.next()
|
||||
|
||||
|
||||
@@ -561,6 +564,8 @@ class ResConfigSettings(models.TransientModel, ResConfigModuleInstallationMixin)
|
||||
# are no longer valid. So we reset the environment.
|
||||
self.env.reset()
|
||||
self = self.env()[self._name]
|
||||
|
||||
# pylint: disable=next-method-called
|
||||
config = self.env['res.config'].next() or {}
|
||||
if config.get('type') not in ('ir.actions.act_window_close',):
|
||||
return config
|
||||
|
||||
@@ -25,6 +25,11 @@ class TestPyLint(TransactionCase):
|
||||
'W0123', # eval used
|
||||
'W0101', # unreachable code
|
||||
|
||||
# py3k checks
|
||||
'print-statement',
|
||||
'backtick',
|
||||
'next-method-called',
|
||||
|
||||
'misplaced-future',
|
||||
'relative-import',
|
||||
'deprecated-module',
|
||||
|
||||
Reference in New Issue
Block a user