flake8 checks resolved

This commit is contained in:
Aayush Goel
2023-07-11 01:31:31 +05:30
parent ef39bc3c3a
commit 1baa7a5e4b
16 changed files with 36 additions and 147 deletions

View File

@@ -43,7 +43,7 @@ def get_features(rule_path: str) -> list:
list: A list of all feature statements contained within the rule file.
"""
feature_list = []
with open(rule_path, "r", encoding="utf-8") as f:
with Path(rule_path).open("r", encoding="utf-8") as f:
try:
new_rule = capa.rules.Rule.from_yaml(f.read())
feature_list = get_child_features(new_rule.statement)