1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

Implement better __repr__ generator

This commit is contained in:
thatmattlove
2021-09-16 15:35:12 -07:00
parent 1e1dce1e30
commit bb1e66c2ef
8 changed files with 62 additions and 24 deletions

View File

@@ -223,7 +223,7 @@ class RuleWithoutValidation(Rule):
return True
Rules = t.Union[RuleWithIPv4, RuleWithIPv6, RuleWithPattern, RuleWithoutValidation]
RuleType = t.Union[RuleWithIPv4, RuleWithIPv6, RuleWithPattern, RuleWithoutValidation]
class Directive(HyperglassModelWithId):
@@ -231,7 +231,7 @@ class Directive(HyperglassModelWithId):
id: StrictStr
name: StrictStr
rules: t.List[Rules]
rules: t.List[RuleType]
field: t.Union[Text, Select, None]
info: t.Optional[FilePath]
plugins: t.List[StrictStr] = []