Fix the version lock update code (#1064)

* Fix the version lock update code
* Add Rule.lock_info() method
This commit is contained in:
Ross Wolf
2021-03-25 14:48:31 -06:00
committed by GitHub
parent c0af222e7e
commit 8ee1b2ffd4
2 changed files with 9 additions and 1 deletions
+3
View File
@@ -324,6 +324,9 @@ class TOMLRuleContents(MarshmallowDataclassMixin):
def name(self) -> str:
return self.data.name
def lock_info(self) -> dict:
return {"rule_name": self.name, "sha256": self.sha256(), "version": self.autobumped_version}
@property
def is_dirty(self) -> Optional[bool]:
"""Determine if the rule has changed since its version was locked."""