1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
import functools from typing import Generic, Any, Type from abc import ABC from . import BaseRule from ..typing import RulesT class Rules(ABC, Generic[RulesT]): ... def aliases(names, ignore_case=False): def decorator(func): func._aliases = names func._ignore_case = ignore_case return func return decorator