Skip to content

Commit e9edb32

Browse files
[IMP] base_kanban_stage: pre-commit auto fixes
1 parent c55ebca commit e9edb32

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

base_kanban_stage/models/base_kanban_stage.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ class BaseKanbanStage(models.Model):
2323
default=1,
2424
required=True,
2525
index=True,
26-
help="Order of stage in relation to other stages available for the"
27-
" same model",
26+
help="Order of stage in relation to other stages available for the same model",
2827
)
2928
legend_priority = fields.Text(
3029
string="Priority Explanation",
@@ -60,7 +59,7 @@ class BaseKanbanStage(models.Model):
6059
)
6160
fold = fields.Boolean(
6261
string="Collapse?",
63-
help="Determines whether this stage will be collapsed down in Kanban" " views",
62+
help="Determines whether this stage will be collapsed down in Kanban views",
6463
)
6564
res_model_id = fields.Many2one(
6665
string="Associated Model",

base_kanban_stage/models/ir_model.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def write(self, vals):
2020
raise UserError(_("Only custom models can be modified."))
2121
if not all(rec.is_kanban <= vals["is_kanban"] for rec in self):
2222
raise UserError(_('Field "Kanban" cannot be changed to "False".'))
23-
res = super(IrModel, self).write(vals)
23+
res = super().write(vals)
2424
# setup models; this reloads custom models in registry
2525
self.pool.setup_models(self._cr)
2626
# update database schema of models
@@ -29,17 +29,17 @@ def write(self, vals):
2929
self._cr, models, dict(self._context, update_custom_fields=True)
3030
)
3131
else:
32-
res = super(IrModel, self).write(vals)
32+
res = super().write(vals)
3333
return res
3434

3535
def _reflect_model_params(self, model):
36-
vals = super(IrModel, self)._reflect_model_params(model)
36+
vals = super()._reflect_model_params(model)
3737
vals["is_kanban"] = issubclass(type(model), self.pool["base.kanban.abstract"])
3838
return vals
3939

4040
@api.model
4141
def _instanciate(self, model_data):
42-
model_class = super(IrModel, self)._instanciate(model_data)
42+
model_class = super()._instanciate(model_data)
4343
if model_data.get("is_kanban") and model_class._name != "base.kanban.abstract":
4444
parents = model_class._inherit or []
4545
parents = [parents] if isinstance(parents, (str,)) else parents

base_kanban_stage/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"

base_kanban_stage/tests/test_base_kanban_abstract.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _init_test_model(self, model_cls):
4040
return model
4141

4242
def setUp(self):
43-
super(TestBaseKanbanAbstract, self).setUp()
43+
super().setUp()
4444

4545
self.registry.enter_test_mode(self.cr)
4646
self.old_cursor = self.cr
@@ -77,7 +77,7 @@ def tearDown(self):
7777
self.cr = self.old_cursor
7878
self.env = api.Environment(self.cr, self.uid, {})
7979

80-
super(TestBaseKanbanAbstract, self).tearDown()
80+
super().tearDown()
8181

8282
def test_default_stage_id_no_stages(self):
8383
"""It should return empty recordset when model has no stages"""

0 commit comments

Comments
 (0)