We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuleGroups currently cannot be parametrized and so all rules it contains are marked as Rule[Any]:
Rule[Any]
class Rule: ... def __or__(self, other: object) -> RuleGroup: if isinstance(other, Rule): return RuleGroup((self, other)) if isinstance(other, RuleGroup): return RuleGroup((self, *other.rules)) return NotImplemented @dataclass(frozen=True) class RuleGroup: rules: tuple[Rule[Any], ...] def __iter__(self) -> Iterator[Rule[Any]]: ... def __or__(self, other: object) -> RuleGroup: if isinstance(other, RuleGroup): return RuleGroup((*self.rules, *other.rules)) if isinstance(other, Rule): return RuleGroup((*self.rules, other)) return NotImplemented
So far I've struggled to find a way of making this type generic properly.
This issue is related to #15 as this makes it harder to correctly type the Crossandra.__rules attribute.
Crossandra.__rules
The text was updated successfully, but these errors were encountered:
Crossandra.tokenize
No branches or pull requests
RuleGroups currently cannot be parametrized and so all rules it contains are marked as
Rule[Any]
:So far I've struggled to find a way of making this type generic properly.
This issue is related to #15 as this makes it harder to correctly type the
Crossandra.__rules
attribute.The text was updated successfully, but these errors were encountered: