Coverage for src/metaclass_registry/__init__.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.17.3, created at 2026-11-17 00:39 +0000

1""" 

2metaclass-registry: Zero-boilerplate metaclass-driven plugin registry system. 

3 

4This package provides a generic metaclass infrastructure for automatic plugin 

5registration with lazy discovery, caching, and zero boilerplate. 

6""" 

7 

8__version__ = "0.5.0" 

9 

10from .cache import RegistryCacheManager 

11from .core import ( 

12 PRIMARY_KEY, 

13 REPLACES_REGISTERED_ATTRIBUTE, 

14 AutoRegisterMeta, 

15 LazyDiscoveryDict, 

16 RegisteredEnumMeta, 

17 RegistryConfig, 

18 RegistryFamily, 

19 RegistryKeyAttribute, 

20 SecondaryRegistry, 

21 SecondaryRegistryDict, 

22 extract_key_from_backend_suffix, 

23 extract_key_from_class_name, 

24 extract_key_from_handler_suffix, 

25 is_same_declaration, 

26 make_suffix_extractor, 

27 register_once, 

28) 

29from .discovery import ( 

30 discover_registry_classes, 

31 discover_registry_classes_recursive, 

32 import_module_preserving_root_logging, 

33) 

34from .exceptions import ( 

35 CacheError, 

36 DiscoveryError, 

37 DuplicateRegistryKeyError, 

38 RegistryError, 

39) 

40from .abstract_hooks import AbstractHooksMeta 

41from .mro_dispatch import MroDispatch, handles 

42 

43__all__ = [ 

44 "AbstractHooksMeta", 

45 # Core 

46 "AutoRegisterMeta", 

47 "RegistryConfig", 

48 "RegistryFamily", 

49 "RegistryKeyAttribute", 

50 "RegisteredEnumMeta", 

51 "PRIMARY_KEY", 

52 "REPLACES_REGISTERED_ATTRIBUTE", 

53 "register_once", 

54 "is_same_declaration", 

55 "SecondaryRegistry", 

56 "LazyDiscoveryDict", 

57 "SecondaryRegistryDict", 

58 "extract_key_from_class_name", 

59 "extract_key_from_handler_suffix", 

60 "extract_key_from_backend_suffix", 

61 "make_suffix_extractor", 

62 # Discovery 

63 "discover_registry_classes", 

64 "discover_registry_classes_recursive", 

65 "import_module_preserving_root_logging", 

66 # Cache 

67 "RegistryCacheManager", 

68 # MRO dispatch 

69 "MroDispatch", 

70 "handles", 

71 # Exceptions 

72 "RegistryError", 

73 "DuplicateRegistryKeyError", 

74 "DiscoveryError", 

75 "CacheError", 

76]