From 3c8460241638df04d6138a39fd1b327835271451 Mon Sep 17 00:00:00 2001
From: James McKinney <26463+jpmckinney@users.noreply.github.com>
Date: Wed, 21 Aug 2024 15:50:54 -0400
Subject: [PATCH] fix: check_and_call_extract_file uses the first matching
 method and options, instead of the first matching method and last matching
 options

---
 babel/messages/extract.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/babel/messages/extract.py b/babel/messages/extract.py
index 8d4bbeaf8..c470ca918 100644
--- a/babel/messages/extract.py
+++ b/babel/messages/extract.py
@@ -276,6 +276,7 @@ def check_and_call_extract_file(
         for opattern, odict in options_map.items():
             if pathmatch(opattern, filename):
                 options = odict
+                break
         if callback:
             callback(filename, method, options)
         for message_tuple in extract_from_file(