Skip to content

Commit c3c5838

Browse files
committed
download python compatibility to 3.8
1 parent 3b449e6 commit c3c5838

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

tools/opa_ctx.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
from dataclasses import dataclass
33
from argparse import ArgumentParser
44
from subprocess import run, PIPE, STDOUT
5+
from typing import List, Optional
56
import os
67
import sys
78

89

910
@dataclass
1011
class Args:
11-
output: str | None
12-
inputs: list[str]
13-
command: list[str]
12+
output: Optional[str]
13+
inputs: List[str]
14+
command: List[str]
1415
wd: str
1516

1617

@@ -43,7 +44,7 @@ def chdir():
4344
os.chdir(user_dir)
4445

4546

46-
def split_once_or_double(s: str, delimiter: str) -> list[str]:
47+
def split_once_or_double(s: str, delimiter: str) -> List[str]:
4748
parts = s.split(delimiter, 1)
4849

4950
return parts if len(parts) == 2 else [s, s]

tools/opa_signer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from subprocess import run, PIPE,STDOUT
44
from dataclasses import dataclass
55
from io import BytesIO
6+
from typing import List
67
import sys
78
import os
89

@@ -12,7 +13,7 @@ class Args:
1213
output: str
1314
signing_key: str
1415
signing_alg: str
15-
command: list[str]
16+
command: List[str]
1617

1718
def parse_args() -> Args:
1819
parser = ArgumentParser(prog="rules_opa::opa_signer", description="Tool to re-bundle an opa bundle with a signature file")

0 commit comments

Comments
 (0)