fix(acms): restore explicit UKO re-exports, fix type annotations, clean lint directives
CI / push-validation (pull_request) Successful in 31s
CI / helm (pull_request) Successful in 44s
CI / build (pull_request) Successful in 1m16s
CI / lint (pull_request) Failing after 1m24s
CI / benchmark-publish (pull_request) Has been skipped
CI / quality (pull_request) Successful in 1m51s
CI / typecheck (pull_request) Successful in 1m59s
CI / security (pull_request) Successful in 2m4s
CI / benchmark-regression (pull_request) Failing after 1m6s
CI / integration_tests (pull_request) Successful in 4m56s
CI / e2e_tests (pull_request) Successful in 5m31s
CI / unit_tests (pull_request) Failing after 6m34s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 3s
CI / push-validation (pull_request) Successful in 31s
CI / helm (pull_request) Successful in 44s
CI / build (pull_request) Successful in 1m16s
CI / lint (pull_request) Failing after 1m24s
CI / benchmark-publish (pull_request) Has been skipped
CI / quality (pull_request) Successful in 1m51s
CI / typecheck (pull_request) Successful in 1m59s
CI / security (pull_request) Successful in 2m4s
CI / benchmark-regression (pull_request) Failing after 1m6s
CI / integration_tests (pull_request) Successful in 4m56s
CI / e2e_tests (pull_request) Successful in 5m31s
CI / unit_tests (pull_request) Failing after 6m34s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 3s
Restore explicit 'from cleveragents.acms.uko import (...)' block in __init__.py so that acms_skeleton_compressor.py can import CODE_DETAIL_LEVEL_MAP etc. Fix invalid dict[str, callable] annotation in robot helper to use collections.abc.Callable[[], None]. Remove unused noqa directives (E501, C901) now that ruff rules are stricter.
This commit is contained in:
@@ -12,7 +12,7 @@ def step_create_budget_enforcer_with_max_file_size(
|
|||||||
context: object, size: int
|
context: object, size: int
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Create a fresh budget enforcer with specified max_file_size."""
|
"""Create a fresh budget enforcer with specified max_file_size."""
|
||||||
context.budget_enforcer = BudgetEnforcer(max_file_size=size, max_total_size=10000) # noqa: E501
|
context.budget_enforcer = BudgetEnforcer(max_file_size=size, max_total_size=10000)
|
||||||
context.file_counter = 0
|
context.file_counter = 0
|
||||||
|
|
||||||
|
|
||||||
@@ -29,7 +29,7 @@ def step_create_budget_enforcer_with_max_total_size(
|
|||||||
enforcer's constraint since both Background steps run sequentially.
|
enforcer's constraint since both Background steps run sequentially.
|
||||||
"""
|
"""
|
||||||
_max_file_size: int
|
_max_file_size: int
|
||||||
if hasattr(context, "budget_enforcer") and context.budget_enforcer is not None: # noqa: E501
|
if hasattr(context, "budget_enforcer") and context.budget_enforcer is not None:
|
||||||
_max_file_size = context.budget_enforcer.max_file_size
|
_max_file_size = context.budget_enforcer.max_file_size
|
||||||
else:
|
else:
|
||||||
_max_file_size = 10000
|
_max_file_size = 10000
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from pathlib import Path
|
from collections.abc import Callable
|
||||||
|
|
||||||
|
|
||||||
def _test_file_within_limit() -> None:
|
def _test_file_within_limit() -> None:
|
||||||
@@ -241,7 +241,7 @@ def _test_assembled_context() -> None:
|
|||||||
print("assembled-context-ok")
|
print("assembled-context-ok")
|
||||||
|
|
||||||
|
|
||||||
_TESTS: dict[str, callable] = {
|
_TESTS: dict[str, Callable[[], None]] = {
|
||||||
"file-within-limit": _test_file_within_limit,
|
"file-within-limit": _test_file_within_limit,
|
||||||
"file-exceeds-limit": _test_file_exceeds_limit,
|
"file-exceeds-limit": _test_file_exceeds_limit,
|
||||||
"total-size-cutoff": _test_total_size_cutoff,
|
"total-size-cutoff": _test_total_size_cutoff,
|
||||||
@@ -255,7 +255,7 @@ _TESTS: dict[str, callable] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__": # noqa: C901
|
if __name__ == "__main__":
|
||||||
if len(sys.argv) < 2 or sys.argv[1] not in _TESTS:
|
if len(sys.argv) < 2 or sys.argv[1] not in _TESTS:
|
||||||
print(
|
print(
|
||||||
f"Usage: {sys.argv[0]} <{'|'.join(sorted(_TESTS))}>",
|
f"Usage: {sys.argv[0]} <{'|'.join(sorted(_TESTS))}>",
|
||||||
|
|||||||
@@ -19,9 +19,56 @@ from cleveragents.acms.index import (
|
|||||||
IndexEntry,
|
IndexEntry,
|
||||||
TierLevel,
|
TierLevel,
|
||||||
)
|
)
|
||||||
|
from cleveragents.acms.uko import (
|
||||||
# Re-export UKO vocabulary symbols for convenience
|
CODE_DETAIL_LEVEL_MAP,
|
||||||
_uko_exports: list[str] = list(_uko.__all__)
|
FUNC_DETAIL_LEVEL_MAP,
|
||||||
|
JAVA_DETAIL_LEVELS,
|
||||||
|
JAVA_VOCABULARY,
|
||||||
|
OO_DETAIL_LEVEL_MAP,
|
||||||
|
PROC_DETAIL_LEVEL_MAP,
|
||||||
|
PYTHON_DETAIL_LEVELS,
|
||||||
|
PYTHON_VOCABULARY,
|
||||||
|
RUST_DETAIL_LEVELS,
|
||||||
|
RUST_VOCABULARY,
|
||||||
|
TYPESCRIPT_DETAIL_LEVELS,
|
||||||
|
TYPESCRIPT_VOCABULARY,
|
||||||
|
DetailLevelMapBuilder,
|
||||||
|
DuplicateVocabularyError,
|
||||||
|
JavaAnnotation,
|
||||||
|
JavaCheckedException,
|
||||||
|
JavaClass,
|
||||||
|
JavaInterface,
|
||||||
|
JavaMethod,
|
||||||
|
Layer2Dependency,
|
||||||
|
ParadigmVocabulary,
|
||||||
|
ProvenanceInfo,
|
||||||
|
PythonClass,
|
||||||
|
PythonDecorator,
|
||||||
|
PythonFunction,
|
||||||
|
PythonModule,
|
||||||
|
PythonTypeStub,
|
||||||
|
RustDeriveAttribute,
|
||||||
|
RustFunction,
|
||||||
|
RustImpl,
|
||||||
|
RustStruct,
|
||||||
|
RustTrait,
|
||||||
|
TypeScriptClass,
|
||||||
|
TypeScriptFunction,
|
||||||
|
TypeScriptInterface,
|
||||||
|
TypeScriptModule,
|
||||||
|
UKOClass,
|
||||||
|
UKOProperty,
|
||||||
|
UKOVocabulary,
|
||||||
|
VocabularyClass,
|
||||||
|
VocabularyProperty,
|
||||||
|
VocabularyRegistry,
|
||||||
|
build_detail_level_map,
|
||||||
|
build_effective_map,
|
||||||
|
get_func_vocabulary,
|
||||||
|
get_oo_vocabulary,
|
||||||
|
get_proc_vocabulary,
|
||||||
|
resolve_detail_level,
|
||||||
|
)
|
||||||
|
|
||||||
# Index model exports
|
# Index model exports
|
||||||
_index_exports: list[str] = [
|
_index_exports: list[str] = [
|
||||||
@@ -39,4 +86,5 @@ _budget_exports: list[str] = [
|
|||||||
"ContextFile",
|
"ContextFile",
|
||||||
]
|
]
|
||||||
|
|
||||||
__all__: list[str] = _budget_exports + _uko_exports + _index_exports
|
# Full __all__ includes uko symbols (already bound as explicit imports) + index + budget
|
||||||
|
__all__: list[str] = list(_uko.__all__) + _index_exports + _budget_exports
|
||||||
|
|||||||
Reference in New Issue
Block a user