This repository was archived by the owner on Jun 13, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +8
-10
lines changed
compare/commands/compare/interactors Expand file tree Collapse file tree 4 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 11import enum
22from typing import List , Optional
33
4- from shared .utils .match import match
4+ from shared .utils .match import Matcher
55
66import services .components as components
77from codecov .commands .base import BaseInteractor
@@ -74,11 +74,8 @@ def _apply_filters(
7474 res = impacted_files
7575
7676 if components_paths :
77- res = [
78- file
79- for file in impacted_files
80- if match (components_paths , file .head_name )
81- ]
77+ matcher = Matcher (components_paths )
78+ res = [file for file in impacted_files if matcher .match (file .head_name )]
8279 return res
8380
8481 def get_attribute (
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ freezegun
2525google-cloud-pubsub
2626gunicorn>=22.0.0
2727https://github.com/codecov/opentelem-python/archive/refs/tags/v0.0.4a1.tar.gz#egg=codecovopentelem
28- https://github.com/codecov/shared/archive/7ba099fa0552244c77a8cc3a4b772216613c09c8 .tar.gz#egg=shared
28+ https://github.com/codecov/shared/archive/3aea532ed80c4d941cbc50e27b11147a8f72d3cd .tar.gz#egg=shared
2929https://github.com/photocrowd/django-cursor-pagination/archive/f560902696b0c8509e4d95c10ba0d62700181d84.tar.gz
3030idna>=3.7
3131minio
Original file line number Diff line number Diff line change @@ -416,7 +416,7 @@ sentry-sdk[celery]==2.13.0
416416 # shared
417417setproctitle == 1.1.10
418418 # via -r requirements.in
419- shared @ https://github.com/codecov/shared/archive/7ba099fa0552244c77a8cc3a4b772216613c09c8 .tar.gz
419+ shared @ https://github.com/codecov/shared/archive/3aea532ed80c4d941cbc50e27b11147a8f72d3cd .tar.gz
420420 # via -r requirements.in
421421simplejson == 3.17.2
422422 # via -r requirements.in
Original file line number Diff line number Diff line change 1111from shared .reports .resources import Report
1212from shared .reports .types import ReportTotals
1313from shared .torngit .exceptions import TorngitClientError
14- from shared .utils .match import match
14+ from shared .utils .match import Matcher
1515
1616import services .report as report_service
1717from codecov_auth .models import Owner
@@ -195,7 +195,8 @@ def files(self) -> list[str]:
195195
196196 # Do path filtering if needed
197197 if self .filter_paths :
198- files = [file for file in files if match (self .filter_paths , file )]
198+ matcher = Matcher (self .filter_paths )
199+ files = [file for file in files if matcher .match (file )]
199200
200201 return files
201202
You can’t perform that action at this time.
0 commit comments