[Bug] Fix AttributeError in RuleCollection dupe check (#1747)

(cherry picked from commit 2828633919)
This commit is contained in:
Justin Ibarra
2022-01-31 15:57:46 -09:00
committed by github-actions[bot]
parent f661eca2eb
commit bd826ceeb3
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -525,7 +525,7 @@ class TOMLRuleContents(BaseRuleContents, MarshmallowDataclassMixin):
class TOMLRule:
contents: TOMLRuleContents = field(hash=True)
path: Optional[Path] = None
gh_pr: Any = field(hash=False, compare=False, default=None, repr=None)
gh_pr: Any = field(hash=False, compare=False, default=None, repr=False)
@property
def id(self):
+1 -1
View File
@@ -203,7 +203,7 @@ class RuleCollection(BaseCollection):
assert not self.frozen, f"Unable to add rule {rule.name} {rule.id} to a frozen collection"
assert rule.id not in id_map, \
f"Rule ID {rule.id} for {rule.name} collides with rule {id_map.get(rule.id).get('name')}"
f"Rule ID {rule.id} for {rule.name} collides with rule {id_map.get(rule.id).name}"
if rule.path is not None:
rule_path = rule.path.resolve()