Skip to content

Commit

Permalink
fix: | None -> Optional
Browse files Browse the repository at this point in the history
To appease the test-code-cov task in the pipeline, even though it passes
locally, and even though it's recommended against
https://discuss.python.org/t/clarification-for-pep-604-is-foo-int-none-to-replace-all-use-of-foo-optional-int/26945/6
  • Loading branch information
d10n committed Feb 12, 2025
1 parent 60ddc35 commit b35b65f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions trestlebot/tasks/sync_cac_catalog_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import os
import pathlib
import re
from typing import List
from typing import List, Optional

import ssg
from ssg.controls import ControlsManager, Policy
Expand All @@ -25,8 +25,8 @@

def get_oscal_control_title(
cac_control_id: str,
cac_control_title: str | None,
parent_title: str | None
cac_control_title: Optional[str],
parent_title: Optional[str]
):
if not cac_control_title:
return cac_control_id
Expand All @@ -47,7 +47,7 @@ def control_cac_to_oscal(
cac_control: ssg.controls.Control,
group_id: str,
oscal_path: List[str],
parent: Control | Group | None = None
parent: Optional[Control | Group] = None
) -> Control:
# 1. Create control and populate basics
oscal_control = generate_sample_model(Control)
Expand Down

0 comments on commit b35b65f

Please sign in to comment.