Use getitem dunder for StatementHandlerRegistry

This commit is contained in:
Pragyansh Chaturvedi
2025-10-05 20:10:07 +05:30
parent b09dc815fc
commit d0a8e96b70

View File

@ -17,6 +17,6 @@ class StatementHandlerRegistry:
return decorator
@classmethod
def get_handler(cls, stmt_type):
def __getitem__(cls, stmt_type):
"""Get the handler for a specific statement type."""
return cls._handlers.get(stmt_type, None)