Skip to content

Commit 38bd754

Browse files
committed
[IMP] extendable_fastapi: pre-commit auto fixes
1 parent 1d4fdb2 commit 38bd754

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-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+
^extendable_fastapi/|
55
# END NOT INSTALLABLE ADDONS
66
# Files and folders generated by bots, to avoid loops
77
^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)