Skip to content

Commit

Permalink
[IMP] [16.0] pre-commit : add black (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
rivo2302 authored Nov 19, 2024
1 parent 5c17236 commit 6321912
Show file tree
Hide file tree
Showing 15 changed files with 9 additions and 18 deletions.
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ default_language_version:
python: python3
node: "14.13.0"
repos:
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black
- repo: https://github.com/PyCQA/flake8
rev: 3.8.3
hooks:
Expand Down
1 change: 0 additions & 1 deletion account_check_printing_aeroo/tests/test_check_printing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class TestCheckPrinting(TransactionCase):

@classmethod
def setUpClass(cls):
super().setUpClass()
Expand Down
4 changes: 1 addition & 3 deletions report_aeroo/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@
],
"demo": ["demo/report_sample.xml"],
"assets": {
"web.assets_backend": [
"report_aeroo/static/src/js/action_manager.js"
],
"web.assets_backend": ["report_aeroo/static/src/js/action_manager.js"],
},
"license": "GPL-3 or any later version",
"installable": True,
Expand Down
3 changes: 1 addition & 2 deletions report_aeroo/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@


class AerooReportController(http.Controller):

@http.route("/web/report_aeroo", type="http", auth="user")
def generate_aeroo_report(self, report_id, record_ids, token, debug=False):
"""Generate an aeroo report.
Expand Down Expand Up @@ -57,7 +56,7 @@ def generate_aeroo_report(self, report_id, record_ids, token, debug=False):
return response
except Exception as e:
se = http.serialize_exception(e)
error = {'code': 200, 'message': "Odoo Server Error", 'data': se}
error = {"code": 200, "message": "Odoo Server Error", "data": se}
return request.make_response(html_escape(json.dumps(error)))

@staticmethod
Expand Down
1 change: 0 additions & 1 deletion report_aeroo/controllers/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class Portal(CustomerPortal):

def _show_aeroo_report(self, record, template, download=False):
"""Show the given aeroo in the portal.
Expand Down
2 changes: 0 additions & 2 deletions report_aeroo/namespace.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

from types import SimpleNamespace


class AerooNamespace(SimpleNamespace):

def update(self, values):
self.__dict__.update(values)
1 change: 0 additions & 1 deletion report_aeroo/tests/test_report_aeroo.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@


class TestAerooReport(TransactionCase):

@classmethod
def setUpClass(cls):
super().setUpClass()
Expand Down
1 change: 0 additions & 1 deletion report_aeroo/tests/test_report_aeroo_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class TestAerooReportAccess(TransactionCase):

@classmethod
def setUpClass(cls):
super().setUpClass()
Expand Down
1 change: 0 additions & 1 deletion report_aeroo/tests/test_report_aeroo_company_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class TestAerooReportCompanyEval(TransactionCase):

@classmethod
def setUpClass(cls):
super().setUpClass()
Expand Down
1 change: 0 additions & 1 deletion report_aeroo/tests/test_report_aeroo_lang_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class TestAerooReportLangEval(TransactionCase):

@classmethod
def setUpClass(cls):
super().setUpClass()
Expand Down
4 changes: 3 additions & 1 deletion report_aeroo/tests/test_report_aeroo_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ def _render_report(self, partners):
:param partners: a res.partner recordset
"""
self.report.with_user(self.env.ref("base.user_demo").id)._render_aeroo(partners.ids, {})
self.report.with_user(self.env.ref("base.user_demo").id)._render_aeroo(
partners.ids, {}
)

def test_generate_report_with_pdf_format_and_multiple_records(self):
self.report.aeroo_out_format_id = self.env.ref(
Expand Down
1 change: 0 additions & 1 deletion report_aeroo_invoice/controllers/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


class PortalAccountWithAerooInvoiceReport(PortalAccount):

@http.route(
["/my/invoices/<int:invoice_id>"], type="http", auth="public", website=True
)
Expand Down
1 change: 0 additions & 1 deletion report_aeroo_invoice/tests/test_res_config_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class TestResConfigSettingsWithAerooReport(TransactionCase):

@classmethod
def setUpClass(cls):
super().setUpClass()
Expand Down
1 change: 0 additions & 1 deletion report_aeroo_replace_qweb/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@


class ReportControllerWithAerooReplacement(ReportController):

@http.route(["/report/download"], type="http", auth="user")
def report_download(self, data, token):
"""Dowload a replacement aeroo report instead of a qweb report.
Expand Down
1 change: 0 additions & 1 deletion report_aeroo_replace_qweb/controllers/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class PortalAccountWithAerooInvoiceReport(CustomerPortal):

def _show_report(self, model, report_type, report_ref, download=False):
"""Dowload a replacement aeroo report instead of a qweb report.
Expand Down

0 comments on commit 6321912

Please sign in to comment.