Skip to content

Commit 2eef11e

Browse files
committed
[IMP] fastapi_auth_jwt_demo: pre-commit auto fixes
1 parent 6106cab commit 2eef11e

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
exclude: |
22
(?x)
33
# NOT INSTALLABLE ADDONS
4-
^extendable/|
4+
^fastapi_auth_jwt_demo/|
55
# END NOT INSTALLABLE ADDONS
66
# Files and folders generated by bots, to avoid loops
77
^setup/|/static/description/index\.html$|

base_rest_auth_api_key/static/description/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ <h1>Base Rest Auth Api Key</h1>
374374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375375
!! source digest: sha256:7c57ea5f8972ccd3fd126f96da0ff252203ec8d51cb0a1f2e4a1b101e730d838
376376
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/license-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/rest-framework/tree/18.0/base_rest_auth_api_key"><img alt="OCA/rest-framework" src="https://img.shields.io/badge/github-OCA%2Frest--framework-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/rest-framework-18-0/rest-framework-18-0-base_rest_auth_api_key"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/rest-framework&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
377+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/rest-framework/tree/18.0/base_rest_auth_api_key"><img alt="OCA/rest-framework" src="https://img.shields.io/badge/github-OCA%2Frest--framework-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/rest-framework-18-0/rest-framework-18-0-base_rest_auth_api_key"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/rest-framework&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378378
<p>This technical addon extend base_rest to add the support for
379379
auth_api_key authentication mechanism into the generated openapi
380380
documentation.</p>

extendable/tests/common.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
from contextlib import contextmanager
55

6-
import odoo
76
from odoo import SUPERUSER_ID, api
87
from odoo.modules.registry import Registry
98
from odoo.tests import common

fastapi_auth_jwt_demo/models/fastapi_endpoint.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99

1010

1111
class FastapiEndpoint(models.Model):
12-
1312
_inherit = "fastapi.endpoint"
1413

1514
app: str = fields.Selection(

fastapi_auth_jwt_demo/routers/auth_jwt_demo_api.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
# Copyright 2023 ACSONE SA/NV
22
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
33

4-
from typing import Annotated, Union
4+
from typing import Annotated
5+
6+
from pydantic import BaseModel
57

68
from odoo.addons.base.models.res_partner import Partner
79
from odoo.addons.fastapi_auth_jwt.dependencies import AuthJwtPartner
810

911
from fastapi import APIRouter, Depends
10-
from pydantic import BaseModel
1112

1213

1314
class TestData(BaseModel):
14-
name: Union[str, None] = None
15-
email: Union[str, None] = None
15+
name: str | None = None
16+
email: str | None = None
1617
uid: int
1718

1819

0 commit comments

Comments
 (0)