- Organized and grouped import statements for better readability in health.py, metadata.py, releases.py, scan.py, search.py, version.py, viewer.py, and registry.py. - Updated type hints to use the new union syntax (e.g., str | None) for better clarity in scan.py, settings.py, tool_detect.py, and result.py. - Enhanced the handling of optional types in various functions to ensure more robust type checking. - Removed unnecessary blank lines and improved formatting for consistency. - Adjusted the logic in several test files to ensure compatibility with the updated import structure and type hints. (See <attachments> above for file contents. You may not need to search or read the file again.)
26 lines
652 B
Python
26 lines
652 B
Python
"""Shared utilities for Majoor Assets Manager."""
|
|
from .errors import sanitize_error_message
|
|
from .log import get_logger, log_structured, log_success, request_id_var
|
|
from .result import Result
|
|
from .time import format_timestamp, ms, now, timer
|
|
from .types import ErrorCode, FileKind, IndexMode, MetadataMode, MetadataQuality, classify_file
|
|
|
|
__all__ = [
|
|
"Result",
|
|
"get_logger",
|
|
"log_success",
|
|
"now",
|
|
"ms",
|
|
"format_timestamp",
|
|
"timer",
|
|
"FileKind",
|
|
"MetadataQuality",
|
|
"ErrorCode",
|
|
"classify_file",
|
|
"IndexMode",
|
|
"MetadataMode",
|
|
"log_structured",
|
|
"request_id_var",
|
|
"sanitize_error_message",
|
|
]
|