Skip to content

Commit 8b9ba16

Browse files
grindtildeathparadoxxxzero
authored andcommitted
[IMP] extendable_fastapi: pre-commit auto fixes
1 parent 7d92612 commit 8b9ba16

3 files changed

Lines changed: 9 additions & 7 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ exclude: |
22
(?x)
33
# NOT INSTALLABLE ADDONS
44
^fastapi_auth_jwt/|
5+
^extendable_fastapi/|
56
# END NOT INSTALLABLE ADDONS
67
# Files and folders generated by bots, to avoid loops
78
^setup/|/static/description/index\.html$|

extendable_fastapi/models/fastapi_endpoint_demo.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
def _get_fastapi_routers(self) -> list[APIRouter]:

extendable_fastapi/tests/test_generic_extendable.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,10 @@ def test_get_user_failed_no_address(self):
166166
"login": "michel",
167167
}
168168
)
169-
with self._create_test_client(
170-
router=demo_pydantic_router
171-
) as test_client, self.assertRaises(ResponseValidationError):
169+
with (
170+
self._create_test_client(router=demo_pydantic_router) as test_client,
171+
self.assertRaises(ResponseValidationError),
172+
):
172173
test_client.get(f"/{user.id}")
173174

174175
def test_get_user_failed_no_pwd(self):
@@ -200,9 +201,10 @@ def test_extra_forbid_response_fails(self):
200201
password = "dummy123"
201202
pydantic_data = PrivateCustomer(name=name, address=address, password=password)
202203

203-
with self.assertRaises(ResponseValidationError), self._create_test_client(
204-
router=demo_pydantic_router
205-
) as test_client:
204+
with (
205+
self.assertRaises(ResponseValidationError),
206+
self._create_test_client(router=demo_pydantic_router) as test_client,
207+
):
206208
test_client.post(
207209
"/post_private_customer", content=pydantic_data.model_dump_json()
208210
)

0 commit comments

Comments
 (0)