Skip to content

Commit

Permalink
chore: fix black v24 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jdobes committed Sep 25, 2024
1 parent 253ee93 commit 8438195
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions evaluator/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ async def _load_vulnerable_package_cache(self) -> Dict[Tuple[int, int, Optional[
async with conn.cursor(row_factory=dict_row) as cur:
await cur.execute("""SELECT id, package_name_id, cpe_id, module_id FROM vulnerable_package""")
for vulnerable_package in await cur.fetchall():
cache[
(vulnerable_package["package_name_id"], vulnerable_package["cpe_id"], vulnerable_package["module_id"])
] = VulnerablePackageCache(vulnerable_package["id"])
cache[(vulnerable_package["package_name_id"], vulnerable_package["cpe_id"], vulnerable_package["module_id"])] = (
VulnerablePackageCache(vulnerable_package["id"])
)
return cache

def _construct_cve_row(self, cve: Dict) -> Dict:
Expand Down
6 changes: 3 additions & 3 deletions taskomatic/jobs/rules_git_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,9 @@ def sync(tmpdirname: str, content_version: str, playbooks_version: str): # pyli
"kbase_node_id": plugin_info.get("node_id") if plugin_info.get("node_id") else None,
"playbook_count": len(playbooks),
"playbooks": playbooks,
"publish_date": datetime.strptime(metadata["publish_date"], "%Y-%m-%d %H:%M:%S")
if "publish_date" in metadata
else None,
"publish_date": (
datetime.strptime(metadata["publish_date"], "%Y-%m-%d %H:%M:%S") if "publish_date" in metadata else None
),
"reboot_required": plugin_info.get("reboot_required"),
"rule_impact": impact_map.get(metadata.get("severity"), 1),
# True if automatic_playbook is missing or true, False otherwise
Expand Down

0 comments on commit 8438195

Please sign in to comment.