Browse Source

[REF] remove unused imports

pull/142/head
robin.keunen 5 years ago
parent
commit
54f1aebd4a
  1. 84
      .eslintrc
  2. 2
      .isort.cfg
  3. 2
      beesdoo_base/models/__init__.py
  4. 2
      beesdoo_base/models/membercard.py
  5. 3
      beesdoo_base/wizard/portal_wizard.py
  6. 2
      beesdoo_easy_my_coop/__init__.py
  7. 1
      beesdoo_easy_my_coop/controllers/main.py
  8. 6
      beesdoo_easy_my_coop/models/__init__.py
  9. 1
      beesdoo_easy_my_coop/models/product.py
  10. 3
      beesdoo_easy_my_coop/models/res_company.py
  11. 3
      beesdoo_easy_my_coop/models/subscription_request.py
  12. 1
      beesdoo_easy_my_coop/tests/test_res_partner.py
  13. 3
      beesdoo_easy_my_coop/wizards/beesdoo_shift_subscribe.py
  14. 2
      beesdoo_inventory/models/stock.py
  15. 4
      beesdoo_shift/models/__init__.py
  16. 2
      beesdoo_shift/models/cooperative_status.py
  17. 4
      beesdoo_shift/models/res_partner.py
  18. 6
      beesdoo_shift/wizard/__init__.py
  19. 2
      beesdoo_shift/wizard/assign_super_coop.py
  20. 6
      beesdoo_shift_attendance/models/attendance_sheet.py
  21. 2
      beesdoo_shift_attendance/models/res_config_settings.py
  22. 3
      beesdoo_shift_attendance/tests/test_beesdoo_shift.py
  23. 2
      beesdoo_shift_attendance/wizard/__init__.py
  24. 2
      beesdoo_shift_attendance/wizard/generate_missing_attendance_sheets.py
  25. 4
      beesdoo_shift_attendance/wizard/validate_attendance_sheet.py
  26. 2
      beesdoo_stock/models/stock.py
  27. 3
      beesdoo_website_shift/controllers/main.py
  28. 2
      beesdoo_website_shift/models/__init__.py
  29. 4
      beesdoo_website_shift/models/res_config.py
  30. 6
      beesdoo_worker_status/models/cooperative_status.py
  31. 6
      beesdoo_worker_status/models/task.py
  32. 4
      beesdoo_worker_status/tests/test_beesdoo_shift.py
  33. 4
      macavrac_base/models/res_partner.py
  34. 2
      purchase_order_generator/models/__init__.py

84
.eslintrc

@ -52,9 +52,14 @@
"no-fallthrough": "warn", "no-fallthrough": "warn",
"no-floating-decimal": "warn", "no-floating-decimal": "warn",
"no-func-assign": "warn", "no-func-assign": "warn",
"no-implicit-coercion": ["warn", {
"allow": ["~"]
}],
"no-implicit-coercion": [
"warn",
{
"allow": [
"~"
]
}
],
"no-implicit-globals": "warn", "no-implicit-globals": "warn",
"no-implied-eval": "warn", "no-implied-eval": "warn",
"no-inline-comments": "warn", "no-inline-comments": "warn",
@ -147,19 +152,32 @@
"arrow-spacing": "off", "arrow-spacing": "off",
"accessor-pairs": "warn", "accessor-pairs": "warn",
"block-scoped-var": "off", "block-scoped-var": "off",
"block-spacing": ["warn", "always"],
"block-spacing": [
"warn",
"always"
],
"brace-style": "warn", "brace-style": "warn",
"callback-return": "warn", "callback-return": "warn",
"camelcase": "off", "camelcase": "off",
"capitalized-comments": ["warn", "always", {
"capitalized-comments": [
"warn",
"always",
{
"ignoreConsecutiveComments": true, "ignoreConsecutiveComments": true,
"ignoreInlineComments": true "ignoreInlineComments": true
}],
"comma-dangle": ["warn", "always-multiline"],
"comma-spacing": ["warn", {
}
],
"comma-dangle": [
"warn",
"always-multiline"
],
"comma-spacing": [
"warn",
{
"before": false, "before": false,
"after": true "after": true
}],
}
],
"comma-style": "warn", "comma-style": "warn",
"complexity": [ "complexity": [
"warn", "warn",
@ -171,7 +189,10 @@
"constructor-super": "warn", "constructor-super": "warn",
"curly": "warn", "curly": "warn",
"default-case": "off", "default-case": "off",
"dot-location": ["warn", "property"],
"dot-location": [
"warn",
"property"
],
"dot-notation": "warn", "dot-notation": "warn",
"eol-last": "warn", "eol-last": "warn",
"eqeqeq": "warn", "eqeqeq": "warn",
@ -195,11 +216,14 @@
], ],
"lines-around-comment": "warn", "lines-around-comment": "warn",
"max-depth": "warn", "max-depth": "warn",
"max-len": ["warn", {
"max-len": [
"warn",
{
"code": 88, "code": 88,
"ignorePattern": "odoo\\.define\\(", "ignorePattern": "odoo\\.define\\(",
"tabWidth": 4 "tabWidth": 4
}],
}
],
"max-lines": "off", "max-lines": "off",
"max-nested-callbacks": "warn", "max-nested-callbacks": "warn",
"max-params": "off", "max-params": "off",
@ -211,11 +235,22 @@
"newline-after-var": "off", "newline-after-var": "off",
"newline-before-return": "off", "newline-before-return": "off",
"newline-per-chained-call": "off", "newline-per-chained-call": "off",
"object-curly-newline": ["warn", { "consistent": true }],
"object-curly-spacing": ["warn", "never"],
"object-property-newline": ["warn", {
"object-curly-newline": [
"warn",
{
"consistent": true
}
],
"object-curly-spacing": [
"warn",
"never"
],
"object-property-newline": [
"warn",
{
"allowAllPropertiesOnSameLine": true "allowAllPropertiesOnSameLine": true
}],
}
],
"object-shorthand": "off", "object-shorthand": "off",
"one-var": "off", "one-var": "off",
"one-var-declaration-per-line": "off", "one-var-declaration-per-line": "off",
@ -245,12 +280,20 @@
"space-in-parens": "off", "space-in-parens": "off",
"space-infix-ops": "off", "space-infix-ops": "off",
"space-unary-ops": "off", "space-unary-ops": "off",
"spaced-comment": ["warn", "always"],
"strict": ["warn", "function"],
"spaced-comment": [
"warn",
"always"
],
"strict": [
"warn",
"function"
],
"template-curly-spacing": "off", "template-curly-spacing": "off",
"unicode-bom": "warn", "unicode-bom": "warn",
"use-isnan": "warn", "use-isnan": "warn",
"valid-jsdoc": ["warn", {
"valid-jsdoc": [
"warn",
{
"prefer": { "prefer": {
"arg": "param", "arg": "param",
"argument": "param", "argument": "param",
@ -277,7 +320,8 @@
"requireReturn": false, "requireReturn": false,
"requireReturnDescription": false, "requireReturnDescription": false,
"requireReturnType": false "requireReturnType": false
}],
}
],
"valid-typeof": "warn", "valid-typeof": "warn",
"vars-on-top": "off", "vars-on-top": "off",
"wrap-iife": "warn", "wrap-iife": "warn",

2
.isort.cfg

@ -9,4 +9,4 @@ line_length=79
known_odoo = odoo known_odoo = odoo
known_odoo_addons = odoo.addons known_odoo_addons = odoo.addons
sections = FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER sections = FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER
known_third_party=lxml,pytz
known_third_party = pytz

2
beesdoo_base/models/__init__.py

@ -1,2 +1,2 @@
from . import partner
from . import membercard from . import membercard
from . import partner

2
beesdoo_base/models/membercard.py

@ -1,6 +1,6 @@
import uuid import uuid
from odoo import api, fields, models
from odoo import fields, models
class MemberCard(models.Model): class MemberCard(models.Model):

3
beesdoo_base/wizard/portal_wizard.py

@ -1,8 +1,7 @@
from odoo import SUPERUSER_ID, api, fields, models
from odoo import api, models
class BeesdooWizard(models.TransientModel): class BeesdooWizard(models.TransientModel):
_inherit = "portal.wizard" _inherit = "portal.wizard"
@api.onchange("portal_id") @api.onchange("portal_id")

2
beesdoo_easy_my_coop/__init__.py

@ -1,3 +1,3 @@
from . import controllers
from . import models from . import models
from . import wizards from . import wizards
from . import controllers

1
beesdoo_easy_my_coop/controllers/main.py

@ -1,4 +1,3 @@
from odoo import http
from odoo.http import request from odoo.http import request
from odoo.addons.easy_my_coop_website.controllers.main import ( from odoo.addons.easy_my_coop_website.controllers.main import (

6
beesdoo_easy_my_coop/models/__init__.py

@ -1,5 +1,5 @@
from . import coop
from . import product
from . import res_company
from . import res_partner from . import res_partner
from . import subscription_request from . import subscription_request
from . import res_company
from . import product
from . import coop

1
beesdoo_easy_my_coop/models/product.py

@ -2,7 +2,6 @@ from odoo import fields, models
class ProductTemplate(models.Model): class ProductTemplate(models.Model):
_inherit = "product.template" _inherit = "product.template"
max_nb_eater_allowed = fields.Integer( max_nb_eater_allowed = fields.Integer(

3
beesdoo_easy_my_coop/models/res_company.py

@ -1,11 +1,10 @@
# Copyright 2019 Coop IT Easy SCRLfs # Copyright 2019 Coop IT Easy SCRLfs
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo import api, fields, models
class ResCompany(models.Model): class ResCompany(models.Model):
_inherit = "res.company" _inherit = "res.company"
display_info_session_confirmation = fields.Boolean( display_info_session_confirmation = fields.Boolean(
help="Choose to display a info session checkbox on the cooperator" help="Choose to display a info session checkbox on the cooperator"

3
beesdoo_easy_my_coop/models/subscription_request.py

@ -1,11 +1,10 @@
# Copyright 2019 Coop IT Easy SCRLfs # Copyright 2019 Coop IT Easy SCRLfs
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo import fields, models
class SubscriptionRequest(models.Model): class SubscriptionRequest(models.Model):
_inherit = "subscription.request" _inherit = "subscription.request"
info_session_confirmed = fields.Boolean( info_session_confirmed = fields.Boolean(

1
beesdoo_easy_my_coop/tests/test_res_partner.py

@ -1,7 +1,6 @@
# Copyright 2020 Coop IT Easy SCRLfs (<http://www.coopiteasy.be>) # Copyright 2020 Coop IT Easy SCRLfs (<http://www.coopiteasy.be>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import exceptions
from odoo.exceptions import ValidationError from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase from odoo.tests.common import TransactionCase

3
beesdoo_easy_my_coop/wizards/beesdoo_shift_subscribe.py

@ -1,11 +1,10 @@
# Copyright 2019 Coop IT Easy SCRLfs # Copyright 2019 Coop IT Easy SCRLfs
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo import fields, models
class Subscribe(models.TransientModel): class Subscribe(models.TransientModel):
_inherit = "beesdoo.shift.subscribe" _inherit = "beesdoo.shift.subscribe"
def _get_info_session_followed(self): def _get_info_session_followed(self):

2
beesdoo_inventory/models/stock.py

@ -1,4 +1,4 @@
from odoo import _, api, fields, models
from odoo import api, fields, models
class StockPicking(models.Model): class StockPicking(models.Model):

4
beesdoo_shift/models/__init__.py

@ -1,4 +1,4 @@
from . import task
from . import planning
from . import cooperative_status from . import cooperative_status
from . import planning
from . import res_partner from . import res_partner
from . import task

2
beesdoo_shift/models/cooperative_status.py

@ -1,5 +1,5 @@
import logging import logging
from datetime import datetime, timedelta
from datetime import timedelta
from odoo import _, api, fields, models from odoo import _, api, fields, models
from odoo.exceptions import UserError, ValidationError from odoo.exceptions import UserError, ValidationError

4
beesdoo_shift/models/res_partner.py

@ -1,8 +1,4 @@
import logging
from datetime import datetime, timedelta
from odoo import _, api, fields, models from odoo import _, api, fields, models
from odoo.exceptions import UserError, ValidationError
class ResPartner(models.Model): class ResPartner(models.Model):

6
beesdoo_shift/wizard/__init__.py

@ -1,7 +1,7 @@
from . import instanciate_planning
from . import batch_template
from . import assign_super_coop from . import assign_super_coop
from . import subscribe
from . import batch_template
from . import extension from . import extension
from . import holiday from . import holiday
from . import instanciate_planning
from . import subscribe
from . import temporary_exemption from . import temporary_exemption

2
beesdoo_shift/wizard/assign_super_coop.py

@ -1,4 +1,4 @@
from odoo import _, api, fields, models
from odoo import api, fields, models
class AssignSuperCoop(models.TransientModel): class AssignSuperCoop(models.TransientModel):

6
beesdoo_shift_attendance/models/attendance_sheet.py

@ -1,9 +1,7 @@
from datetime import date, datetime, timedelta from datetime import date, datetime, timedelta
from lxml import etree
from odoo import _, api, exceptions, fields, models
from odoo.exceptions import UserError, ValidationError
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class AttendanceSheetShift(models.Model): class AttendanceSheetShift(models.Model):

2
beesdoo_shift_attendance/models/res_config_settings.py

@ -1,8 +1,6 @@
# Copyright 2019-2020 Elouan Le Bars <elouan@coopiteasy.be> # Copyright 2019-2020 Elouan Le Bars <elouan@coopiteasy.be>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import ast
from odoo import api, fields, models from odoo import api, fields, models

3
beesdoo_shift_attendance/tests/test_beesdoo_shift.py

@ -4,8 +4,7 @@
import time import time
from datetime import datetime, timedelta from datetime import datetime, timedelta
from odoo import exceptions, fields
from odoo.exceptions import UserError, ValidationError
from odoo.exceptions import UserError
from odoo.tests.common import TransactionCase from odoo.tests.common import TransactionCase

2
beesdoo_shift_attendance/wizard/__init__.py

@ -1,2 +1,2 @@
from . import validate_attendance_sheet
from . import generate_missing_attendance_sheets from . import generate_missing_attendance_sheets
from . import validate_attendance_sheet

2
beesdoo_shift_attendance/wizard/generate_missing_attendance_sheets.py

@ -1,7 +1,7 @@
from datetime import datetime from datetime import datetime
from odoo import _, api, fields, models from odoo import _, api, fields, models
from odoo.exceptions import UserError, ValidationError
from odoo.exceptions import UserError
class GenerateMissingAttendanceSheets(models.TransientModel): class GenerateMissingAttendanceSheets(models.TransientModel):

4
beesdoo_shift_attendance/wizard/validate_attendance_sheet.py

@ -1,7 +1,7 @@
import ast import ast
from odoo import _, api, exceptions, fields, models
from odoo.exceptions import UserError, ValidationError
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class ValidateAttendanceSheet(models.TransientModel): class ValidateAttendanceSheet(models.TransientModel):

2
beesdoo_stock/models/stock.py

@ -1,4 +1,4 @@
from odoo import api, fields, models
from odoo import api, models
class StockPackOperation(models.Model): class StockPackOperation(models.Model):

3
beesdoo_website_shift/controllers/main.py

@ -3,13 +3,12 @@
# Copyright 2017-2018 Thibault François # Copyright 2017-2018 Thibault François
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from ast import literal_eval
from datetime import datetime, timedelta from datetime import datetime, timedelta
from itertools import groupby from itertools import groupby
from pytz import timezone, utc from pytz import timezone, utc
from odoo import fields, http
from odoo import http
from odoo.http import request from odoo.http import request
from odoo.addons.beesdoo_shift.models.planning import float_to_time from odoo.addons.beesdoo_shift.models.planning import float_to_time

2
beesdoo_website_shift/models/__init__.py

@ -1,2 +1,2 @@
from . import website
from . import res_config from . import res_config
from . import website

4
beesdoo_website_shift/models/res_config.py

@ -1,9 +1,7 @@
# Copyright 2017-2020 Rémy Taymans <remytaymans@gmail.com> # Copyright 2017-2020 Rémy Taymans <remytaymans@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from ast import literal_eval
from odoo import api, fields, models
from odoo import fields, models
class WebsiteShiftConfigSettings(models.TransientModel): class WebsiteShiftConfigSettings(models.TransientModel):

6
beesdoo_worker_status/models/cooperative_status.py

@ -1,8 +1,4 @@
import logging
from datetime import datetime, timedelta
from odoo import _, api, fields, models
from odoo.exceptions import UserError, ValidationError
from odoo import api, fields, models
from odoo.addons.beesdoo_shift.models.cooperative_status import add_days_delta from odoo.addons.beesdoo_shift.models.cooperative_status import add_days_delta

6
beesdoo_worker_status/models/task.py

@ -1,8 +1,4 @@
import json
from datetime import datetime, timedelta
from odoo import _, api, fields, models
from odoo.exceptions import UserError, ValidationError
from odoo import fields, models
class Task(models.Model): class Task(models.Model):

4
beesdoo_worker_status/tests/test_beesdoo_shift.py

@ -1,11 +1,9 @@
# Copyright 2019 - Today Coop IT Easy SCRLfs (<http://www.coopiteasy.be>) # Copyright 2019 - Today Coop IT Easy SCRLfs (<http://www.coopiteasy.be>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import time
from datetime import datetime, timedelta from datetime import datetime, timedelta
from odoo import exceptions, fields
from odoo.exceptions import UserError, ValidationError
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase from odoo.tests.common import TransactionCase

4
macavrac_base/models/res_partner.py

@ -1,9 +1,7 @@
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
from odoo import api, fields, models
class Partner(models.Model): class Partner(models.Model):
_inherit = "res.partner" _inherit = "res.partner"
date_stamp = fields.Date( date_stamp = fields.Date(

2
purchase_order_generator/models/__init__.py

@ -1,4 +1,4 @@
from . import product_template
from . import purchase_order from . import purchase_order
from . import purchase_order_generator from . import purchase_order_generator
from . import purchase_order_generator_line from . import purchase_order_generator_line
from . import product_template
Loading…
Cancel
Save