fix(acms): apply ruff format to index.py to pass CI format check
CI / helm (pull_request) Successful in 39s
CI / lint (pull_request) Successful in 59s
CI / build (pull_request) Successful in 55s
CI / quality (pull_request) Successful in 1m20s
CI / push-validation (pull_request) Successful in 32s
CI / typecheck (pull_request) Successful in 1m32s
CI / security (pull_request) Successful in 1m53s
CI / e2e_tests (pull_request) Successful in 3m53s
CI / integration_tests (pull_request) Successful in 4m27s
CI / unit_tests (pull_request) Failing after 4m32s
CI / docker (pull_request) Has been skipped
CI / coverage (pull_request) Successful in 10m34s
CI / status-check (pull_request) Failing after 3s
CI / helm (pull_request) Successful in 39s
CI / lint (pull_request) Successful in 59s
CI / build (pull_request) Successful in 55s
CI / quality (pull_request) Successful in 1m20s
CI / push-validation (pull_request) Successful in 32s
CI / typecheck (pull_request) Successful in 1m32s
CI / security (pull_request) Successful in 1m53s
CI / e2e_tests (pull_request) Successful in 3m53s
CI / integration_tests (pull_request) Successful in 4m27s
CI / unit_tests (pull_request) Failing after 4m32s
CI / docker (pull_request) Has been skipped
CI / coverage (pull_request) Successful in 10m34s
CI / status-check (pull_request) Failing after 3s
This commit is contained in:
@@ -155,9 +155,7 @@ class ACMSIndex:
|
||||
"""
|
||||
if not path_pattern or not path_pattern.strip():
|
||||
raise ValueError("path_pattern must be a non-empty string")
|
||||
return [
|
||||
entry for entry in self.entries.values() if path_pattern in entry.path
|
||||
]
|
||||
return [entry for entry in self.entries.values() if path_pattern in entry.path]
|
||||
|
||||
def query_by_tag(self, tag: str) -> list[IndexEntry]:
|
||||
"""Query entries by tag."""
|
||||
@@ -227,9 +225,7 @@ class ACMSIndex:
|
||||
|
||||
if tags:
|
||||
results = [
|
||||
entry
|
||||
for entry in results
|
||||
if any(tag in entry.tags for tag in tags)
|
||||
entry for entry in results if any(tag in entry.tags for tag in tags)
|
||||
]
|
||||
|
||||
if file_type:
|
||||
@@ -263,9 +259,7 @@ class FileTraversalEngine:
|
||||
index: The ACMS index to populate
|
||||
"""
|
||||
|
||||
def __init__(
|
||||
self, chunk_size: int = 100, index: ACMSIndex | None = None
|
||||
) -> None:
|
||||
def __init__(self, chunk_size: int = 100, index: ACMSIndex | None = None) -> None:
|
||||
"""Initialize the traversal engine.
|
||||
|
||||
Args:
|
||||
@@ -278,9 +272,7 @@ class FileTraversalEngine:
|
||||
ValueError: If chunk_size is not a positive integer.
|
||||
"""
|
||||
if chunk_size <= 0:
|
||||
raise ValueError(
|
||||
f"chunk_size must be a positive integer, got {chunk_size}"
|
||||
)
|
||||
raise ValueError(f"chunk_size must be a positive integer, got {chunk_size}")
|
||||
self.chunk_size = chunk_size
|
||||
self.index = index if index is not None else ACMSIndex()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user