File tree Expand file tree Collapse file tree 3 files changed +162
-757
lines changed
src/vectorcode/subcommands/vectorise Expand file tree Collapse file tree 3 files changed +162
-757
lines changed Original file line number Diff line number Diff line change @@ -92,9 +92,10 @@ async def vectorise_worker(
9292 stats_lock : Lock ,
9393):
9494 async with semaphore , stats_lock :
95- stats += await database .vectorise (
96- file_path = file_path ,
97- )
95+ if os .path .isfile (file_path ):
96+ stats += await database .vectorise (
97+ file_path = file_path ,
98+ )
9899
99100
100101async def vectorise (configs : Config ) -> int :
@@ -152,7 +153,7 @@ async def vectorise(configs: Config) -> int:
152153 for task in asyncio .as_completed (tasks ):
153154 await task
154155 bar .update (1 )
155- except asyncio .CancelledError :
156+ except asyncio .CancelledError : # pragma: nocover
156157 logger .warning ("Abort." )
157158 return 1
158159
Original file line number Diff line number Diff line change 1111class FilterManager :
1212 def __init__ (self , from_filters : Sequence [FileFilter ] | None = None ) -> None :
1313 self ._filters : list [FileFilter ] = []
14- if from_filters :
14+ if from_filters : # pragma: nocover
1515 self ._filters .extend (from_filters )
1616
1717 def add_filter (self , f : FileFilter = lambda x : bool (x )) -> Self :
You can’t perform that action at this time.
0 commit comments