Browse Source

🎨 Auto format

pull/14924/head
pre-commit-ci-lite[bot] 5 months ago
committed by GitHub
parent
commit
294cd03dd9
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      fastapi/routing.py
  2. 1
      tests/test_apirouter_mount.py

4
fastapi/routing.py

@ -1506,7 +1506,9 @@ class APIRouter(routing.Router):
)
elif isinstance(route, routing.Mount):
if isinstance(route.app, StaticFiles):
self._mount(prefix + router.prefix + route.path, route.app, name=route.name)
self._mount(
prefix + router.prefix + route.path, route.app, name=route.name
)
for handler in router.on_startup:
self.add_event_handler("startup", handler)
for handler in router.on_shutdown:

1
tests/test_apirouter_mount.py

@ -1,4 +1,5 @@
"""Tests for mounting StaticFiles under APIRouter (issue #10180)."""
from pathlib import Path
import pytest

Loading…
Cancel
Save