constants.py

Code Hygiene Score: 100

Keine Issues gefunden.

Code

"""Constants for Contract Tools"""

# Error message limits
ERROR_MESSAGE_MAX_LENGTH: int = 200

# Default values
DEFAULT_VERSION: str = "1.0"
DEFAULT_STATUS: str = "active"
DEFAULT_CREATED_BY: str = "mcp-contracts"
DEFAULT_CHANGED_BY: str = "mcp-contracts"
DEFAULT_TRIGGERED_BY: str = "mcp"
DEFAULT_LIMIT: int = 20
DEFAULT_VIOLATIONS_LIMIT: int = 10
DEFAULT_VALIDATIONS_LIMIT: int = 5

# Valid statuses
VALID_STATUSES: tuple[str, ...] = ("draft", "active", "deprecated")

# Valid triggers
VALID_TRIGGERS: tuple[str, ...] = ("mcp", "sync", "manual", "hook")

# Validation results
VALIDATION_PASSED: str = "passed"
VALIDATION_FAILED: str = "failed"

# Log statuses
LOG_STATUS_SUCCESS: str = "success"
LOG_STATUS_ERROR: str = "error"
LOG_STATUS_DENIED: str = "denied"

# Time conversions
MS_PER_SECOND: int = 1000
← Übersicht