Browse Source

Global pylint cleanup

pull/1353/head
Simone Orsi 6 years ago
parent
commit
b11aee0eaa
  1. 4
      base_cron_exclusion/models/ir_cron.py
  2. 3
      database_cleanup/__init__.py
  3. 3
      database_cleanup/__manifest__.py
  4. 3
      database_cleanup/identifier_adapter.py
  5. 4
      database_cleanup/models/create_indexes.py
  6. 4
      database_cleanup/models/purge_columns.py
  7. 3
      database_cleanup/models/purge_data.py
  8. 4
      database_cleanup/models/purge_menus.py
  9. 4
      database_cleanup/models/purge_models.py
  10. 4
      database_cleanup/models/purge_modules.py
  11. 4
      database_cleanup/models/purge_properties.py
  12. 4
      database_cleanup/models/purge_tables.py
  13. 5
      database_cleanup/models/purge_wizard.py
  14. 3
      database_cleanup/tests/__init__.py
  15. 3
      database_cleanup/tests/test_database_cleanup.py
  16. 1
      module_auto_update/addon_hash.py
  17. 1
      module_auto_update/migrations/10.0.2.0.0/pre-migrate.py
  18. 1
      module_auto_update/models/module.py
  19. 1
      module_auto_update/models/module_deprecated.py
  20. 2
      module_auto_update/tests/sample_module/static/src/some.js
  21. 1
      module_auto_update/tests/test_addon_hash.py
  22. 1
      module_auto_update/tests/test_module.py
  23. 3
      module_auto_update/tests/test_module_deprecated.py
  24. 1
      scheduler_error_mailer/__init__.py
  25. 1
      sentry/__init__.py
  26. 1
      sentry/__manifest__.py
  27. 1
      sentry/const.py
  28. 1
      sentry/logutils.py
  29. 1
      sentry/tests/__init__.py
  30. 1
      sentry/tests/test_client.py
  31. 1
      sentry/tests/test_logutils.py

4
base_cron_exclusion/models/ir_cron.py

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

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).
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).
{
'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).
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).
# pylint: disable=consider-merging-classes-inherited
from ..identifier_adapter import IdentifierAdapter
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).
# pylint: disable=consider-merging-classes-inherited
from odoo import _, api, fields, models
from odoo.exceptions import UserError
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).
from odoo import _, api, fields, models
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).
# pylint: disable=consider-merging-classes-inherited
from odoo import _, api, fields, models
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).
# pylint: disable=consider-merging-classes-inherited
from odoo import _, api, models, fields
from odoo.exceptions import UserError
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).
# pylint: disable=consider-merging-classes-inherited
from odoo import _, api, fields, models
from odoo.exceptions import UserError
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).
# pylint: disable=consider-merging-classes-inherited
from odoo import api, models, fields
REASON_DUPLICATE = 1
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).
# pylint: disable=consider-merging-classes-inherited
from odoo import api, fields, models, _
from odoo.exceptions import UserError
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).
# pylint: disable=consider-merging-classes-inherited
import logging
from odoo import _, api, fields, models
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).
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).
from psycopg2 import ProgrammingError
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.
# 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
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
import logging

1
module_auto_update/models/module.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2017 LasLabs Inc.
# Copyright 2018 ACSONE SA/NV.
# 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.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
# pylint: disable=consider-merging-classes-inherited
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.
# 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 2018 ACSONE SA/NV.
# 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.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

1
scheduler_error_mailer/__init__.py

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

Loading…
Cancel
Save