From 5213038bad637e5bdac471da6388d8c66ad69fa6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Sat, 14 Feb 2026 16:23:13 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Auto=20format?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastapi/routing.py | 4 +++- tests/test_apirouter_mount.py | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/fastapi/routing.py b/fastapi/routing.py index eaaeee748..512f718f8 100644 --- a/fastapi/routing.py +++ b/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: diff --git a/tests/test_apirouter_mount.py b/tests/test_apirouter_mount.py index 1a2de5482..e6c18b768 100644 --- a/tests/test_apirouter_mount.py +++ b/tests/test_apirouter_mount.py @@ -1,4 +1,5 @@ """Tests for mounting StaticFiles under APIRouter (issue #10180).""" + from pathlib import Path import pytest