Browse Source

Merge pull request #1353 from simahawk/smk-fix-lint

Global pylint cleanup
pull/1359/head
Pedro M. Baeza 6 years ago
committed by GitHub
parent
commit
7d21e14154
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      base_cron_exclusion/models/ir_cron.py
  2. 2
      base_technical_user/README.rst
  3. 3
      database_cleanup/__init__.py
  4. 3
      database_cleanup/__manifest__.py
  5. 3
      database_cleanup/identifier_adapter.py
  6. 4
      database_cleanup/models/create_indexes.py
  7. 4
      database_cleanup/models/purge_columns.py
  8. 3
      database_cleanup/models/purge_data.py
  9. 4
      database_cleanup/models/purge_menus.py
  10. 4
      database_cleanup/models/purge_models.py
  11. 4
      database_cleanup/models/purge_modules.py
  12. 4
      database_cleanup/models/purge_properties.py
  13. 4
      database_cleanup/models/purge_tables.py
  14. 5
      database_cleanup/models/purge_wizard.py
  15. 3
      database_cleanup/tests/__init__.py
  16. 3
      database_cleanup/tests/test_database_cleanup.py
  17. 1
      module_auto_update/addon_hash.py
  18. 1
      module_auto_update/migrations/10.0.2.0.0/pre-migrate.py
  19. 1
      module_auto_update/models/module.py
  20. 1
      module_auto_update/models/module_deprecated.py
  21. 2
      module_auto_update/tests/sample_module/static/src/some.js
  22. 1
      module_auto_update/tests/test_addon_hash.py
  23. 1
      module_auto_update/tests/test_module.py
  24. 3
      module_auto_update/tests/test_module_deprecated.py
  25. 1
      scheduler_error_mailer/__init__.py
  26. 1
      sentry/__init__.py
  27. 1
      sentry/__manifest__.py
  28. 1
      sentry/const.py
  29. 1
      sentry/logutils.py
  30. 1
      sentry/tests/__init__.py
  31. 1
      sentry/tests/test_client.py
  32. 1
      sentry/tests/test_logutils.py

10
base_cron_exclusion/models/ir_cron.py

@ -14,13 +14,13 @@ _logger = logging.getLogger(__name__)
class IrCron(models.Model): class IrCron(models.Model):
_inherit = "ir.cron" _inherit = "ir.cron"
@api.one
@api.constrains('mutually_exclusive_cron_ids') @api.constrains('mutually_exclusive_cron_ids')
def _check_auto_exclusion(self): def _check_auto_exclusion(self):
if self in self.mutually_exclusive_cron_ids:
raise ValidationError(_(
"You can not mutually exclude a scheduled actions with "
"itself."))
for item in self:
if item in item.mutually_exclusive_cron_ids:
raise ValidationError(_(
"You can not mutually exclude a scheduled actions with "
"itself."))
mutually_exclusive_cron_ids = fields.Many2many( mutually_exclusive_cron_ids = fields.Many2many(
comodel_name="ir.cron", relation="ir_cron_exclusion", comodel_name="ir.cron", relation="ir_cron_exclusion",

2
base_technical_user/README.rst

@ -50,4 +50,4 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and mission is to support the collaborative development of Odoo features and
promote its widespread use. promote its widespread use.
To contribute to this module, please visit http://odoo-community.org.
To contribute to this module, please visit http://odoo-community.org.

3
database_cleanup/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2014-2016 Therp BV <http://therp.nl>
# Copyright 2014-2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models from . import models

3
database_cleanup/__manifest__.py

@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
# © 2014-2016 Therp BV <http://therp.nl>
# Copyright 2014-2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{ {
'name': 'Database cleanup', 'name': 'Database cleanup',

3
database_cleanup/identifier_adapter.py

@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# Copyright 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from psycopg2.extensions import ISQLQuote from psycopg2.extensions import ISQLQuote

4
database_cleanup/models/create_indexes.py

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# © 2017 Therp BV <http://therp.nl>
# Copyright 2017 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
from ..identifier_adapter import IdentifierAdapter from ..identifier_adapter import IdentifierAdapter
from odoo import api, fields, models from odoo import api, fields, models

4
database_cleanup/models/purge_columns.py

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# © 2014-2016 Therp BV <http://therp.nl>
# Copyright 2014-2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
from odoo import _, api, fields, models from odoo import _, api, fields, models
from odoo.exceptions import UserError from odoo.exceptions import UserError
from ..identifier_adapter import IdentifierAdapter from ..identifier_adapter import IdentifierAdapter

3
database_cleanup/models/purge_data.py

@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
# © 2014-2016 Therp BV <http://therp.nl>
# Copyright 2014-2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models from odoo import _, api, fields, models
from odoo.exceptions import UserError from odoo.exceptions import UserError

4
database_cleanup/models/purge_menus.py

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# © 2014-2016 Therp BV <http://therp.nl>
# Copyright 2014-2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
from odoo import _, api, fields, models from odoo import _, api, fields, models
from odoo.exceptions import UserError from odoo.exceptions import UserError

4
database_cleanup/models/purge_models.py

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# © 2014-2016 Therp BV <http://therp.nl>
# Copyright 2014-2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
from odoo import _, api, models, fields from odoo import _, api, models, fields
from odoo.exceptions import UserError from odoo.exceptions import UserError
from odoo.addons.base.ir.ir_model import MODULE_UNINSTALL_FLAG from odoo.addons.base.ir.ir_model import MODULE_UNINSTALL_FLAG

4
database_cleanup/models/purge_modules.py

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# © 2014-2016 Therp BV <http://therp.nl>
# Copyright 2014-2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
from odoo import _, api, fields, models from odoo import _, api, fields, models
from odoo.exceptions import UserError from odoo.exceptions import UserError
from odoo.modules.module import get_module_path from odoo.modules.module import get_module_path

4
database_cleanup/models/purge_properties.py

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# © 2017 Therp BV <http://therp.nl>
# Copyright 2017 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
from odoo import api, models, fields from odoo import api, models, fields
REASON_DUPLICATE = 1 REASON_DUPLICATE = 1
REASON_DEFAULT = 2 REASON_DEFAULT = 2

4
database_cleanup/models/purge_tables.py

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
# © 2014-2016 Therp BV <http://therp.nl>
# Copyright 2014-2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
from odoo import api, fields, models, _ from odoo import api, fields, models, _
from odoo.exceptions import UserError from odoo.exceptions import UserError
from ..identifier_adapter import IdentifierAdapter from ..identifier_adapter import IdentifierAdapter

5
database_cleanup/models/purge_wizard.py

@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
# © 2014-2016 Therp BV <http://therp.nl>
# Copyright 2014-2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# pylint: disable=consider-merging-classes-inherited
import logging import logging
from odoo import _, api, fields, models from odoo import _, api, fields, models
from odoo.exceptions import AccessDenied from odoo.exceptions import AccessDenied

3
database_cleanup/tests/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# Copyright 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import test_database_cleanup from . import test_database_cleanup

3
database_cleanup/tests/test_database_cleanup.py

@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-
# © 2016 Therp BV <http://therp.nl>
# Copyright 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from psycopg2 import ProgrammingError from psycopg2 import ProgrammingError
from odoo.modules.registry import Registry from odoo.modules.registry import Registry

1
module_auto_update/addon_hash.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2018 ACSONE SA/NV. # Copyright 2018 ACSONE SA/NV.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

1
module_auto_update/migrations/10.0.2.0.0/pre-migrate.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Tecnativa - Jairo Llopis # Copyright 2018 Tecnativa - Jairo Llopis
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
import logging import logging

1
module_auto_update/models/module.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc. # Copyright 2017 LasLabs Inc.
# Copyright 2018 ACSONE SA/NV. # Copyright 2018 ACSONE SA/NV.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

1
module_auto_update/models/module_deprecated.py

@ -1,5 +1,6 @@
# Copyright 2017 LasLabs Inc. # Copyright 2017 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
# pylint: disable=consider-merging-classes-inherited
from odoo import api, fields, models from odoo import api, fields, models

2
module_auto_update/tests/sample_module/static/src/some.js

@ -1 +1 @@
/* javascript */
/* Javascript */

1
module_auto_update/tests/test_addon_hash.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2018 ACSONE SA/NV. # Copyright 2018 ACSONE SA/NV.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

1
module_auto_update/tests/test_module.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc. # Copyright 2017 LasLabs Inc.
# Copyright 2018 ACSONE SA/NV. # Copyright 2018 ACSONE SA/NV.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

3
module_auto_update/tests/test_module_deprecated.py

@ -9,8 +9,7 @@ from odoo.modules import get_module_path
from odoo.tests.common import TransactionCase from odoo.tests.common import TransactionCase
from odoo.tools import mute_logger from odoo.tools import mute_logger
from odoo.addons.module_auto_update.addon_hash import addon_hash
from .. addon_hash import addon_hash
from ..models.module_deprecated import PARAM_DEPRECATED from ..models.module_deprecated import PARAM_DEPRECATED

1
scheduler_error_mailer/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# © 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre # © 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre
# © 2016 Sodexis # © 2016 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

1
sentry/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2017 Versada <https://versada.eu/> # Copyright 2016-2017 Versada <https://versada.eu/>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

1
sentry/__manifest__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2017 Versada <https://versada.eu/> # Copyright 2016-2017 Versada <https://versada.eu/>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{ {

1
sentry/const.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2017 Versada <https://versada.eu/> # Copyright 2016-2017 Versada <https://versada.eu/>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

1
sentry/logutils.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2017 Versada <https://versada.eu/> # Copyright 2016-2017 Versada <https://versada.eu/>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

1
sentry/tests/__init__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2017 Versada <https://versada.eu/> # Copyright 2016-2017 Versada <https://versada.eu/>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

1
sentry/tests/test_client.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2017 Versada <https://versada.eu/> # Copyright 2016-2017 Versada <https://versada.eu/>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

1
sentry/tests/test_logutils.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2017 Versada <https://versada.eu/> # Copyright 2016-2017 Versada <https://versada.eu/>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

Loading…
Cancel
Save