From 294cd03dd912525b6e4850fb967469b035e4f2cb 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 15:49:14 +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 eaaeee7481..512f718f8c 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 1a2de54822..e6c18b7687 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