From 50d4a33f3101630ec15187ccc68ff8607572ee94 Mon Sep 17 00:00:00 2001 From: maltayyar2 Date: Thu, 4 Dec 2025 11:46:24 +0300 Subject: [PATCH 1/3] [FIX] event_custom: test code quality detection --- .../event_custom/models/code_quality_pr_test.py | 15 +++++++++++++++ .../event_custom/models/final_quality_test.py | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 odex-event/event_custom/models/code_quality_pr_test.py create mode 100644 odex-event/event_custom/models/final_quality_test.py diff --git a/odex-event/event_custom/models/code_quality_pr_test.py b/odex-event/event_custom/models/code_quality_pr_test.py new file mode 100644 index 000000000..b2a537685 --- /dev/null +++ b/odex-event/event_custom/models/code_quality_pr_test.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +from odoo import models, fields +import unused_module # F401 + +class CodeQualityPRTest(models.Model): + _name = 'code.quality.test' + + name = fields.Char('Name') + + # E501 + very_long_field = fields.Text('Field', help='This is an extremely long help text that exceeds the 120 character limit that we have configured in our flake8 settings') + + # F821 + def buggy_method(self): + return undefined + 1 diff --git a/odex-event/event_custom/models/final_quality_test.py b/odex-event/event_custom/models/final_quality_test.py new file mode 100644 index 000000000..7851e93bd --- /dev/null +++ b/odex-event/event_custom/models/final_quality_test.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +from odoo import models, fields +import os # F401: unused import + +class FinalQualityTest(models.Model): + _name = 'final.quality.test' + + name = fields.Char('Name') + + # E501: line too long + description = fields.Text('Description', help='This is a very very very long help text that exceeds 120 characters limit set by our flake8 configuration') + + # F821: undefined name + def test_method(self): + return some_undefined_variable + 5 From 270bec45fdd355d019f599236a45c72da903cc10 Mon Sep 17 00:00:00 2001 From: maltayyar2 Date: Thu, 4 Dec 2025 12:07:18 +0300 Subject: [PATCH 2/3] [TEST] event_custom: code quality hints test --- odex-event/event_custom/models/hints_test.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 odex-event/event_custom/models/hints_test.py diff --git a/odex-event/event_custom/models/hints_test.py b/odex-event/event_custom/models/hints_test.py new file mode 100644 index 000000000..02f51db79 --- /dev/null +++ b/odex-event/event_custom/models/hints_test.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +from odoo import models, fields +import unused_import # F401 + +class HintsTest(models.Model): + _name = 'hints.test' + name = fields.Char('Name') + + # E501 + long_field = fields.Text('Field', help='This is an extremely long text that exceeds one hundred and twenty characters maximum line length limit') + + # F821 + def buggy(self): + return undefined_variable + 1 + + # E225 + count=fields.Integer(default=0) + + # W291 + status = fields.Selection([('a', 'A')]) From f0e3404c7695db0ff586f2e4711732cdfbdab064 Mon Sep 17 00:00:00 2001 From: maltayyar2 Date: Thu, 4 Dec 2025 14:58:59 +0300 Subject: [PATCH 3/3] [FIX] event_custom: automatic update Auto-generated commit based on local changes. --- odex-event/event_custom/models/hints_test.py | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 odex-event/event_custom/models/hints_test.py diff --git a/odex-event/event_custom/models/hints_test.py b/odex-event/event_custom/models/hints_test.py deleted file mode 100644 index 02f51db79..000000000 --- a/odex-event/event_custom/models/hints_test.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -from odoo import models, fields -import unused_import # F401 - -class HintsTest(models.Model): - _name = 'hints.test' - name = fields.Char('Name') - - # E501 - long_field = fields.Text('Field', help='This is an extremely long text that exceeds one hundred and twenty characters maximum line length limit') - - # F821 - def buggy(self): - return undefined_variable + 1 - - # E225 - count=fields.Integer(default=0) - - # W291 - status = fields.Selection([('a', 'A')])