File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 2
2
from dataclasses import dataclass
3
3
from argparse import ArgumentParser
4
4
from subprocess import run , PIPE , STDOUT
5
+ from typing import List , Optional
5
6
import os
6
7
import sys
7
8
8
9
9
10
@dataclass
10
11
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 ]
14
15
wd : str
15
16
16
17
@@ -43,7 +44,7 @@ def chdir():
43
44
os .chdir (user_dir )
44
45
45
46
46
- def split_once_or_double (s : str , delimiter : str ) -> list [str ]:
47
+ def split_once_or_double (s : str , delimiter : str ) -> List [str ]:
47
48
parts = s .split (delimiter , 1 )
48
49
49
50
return parts if len (parts ) == 2 else [s , s ]
Original file line number Diff line number Diff line change 3
3
from subprocess import run , PIPE ,STDOUT
4
4
from dataclasses import dataclass
5
5
from io import BytesIO
6
+ from typing import List
6
7
import sys
7
8
import os
8
9
@@ -12,7 +13,7 @@ class Args:
12
13
output : str
13
14
signing_key : str
14
15
signing_alg : str
15
- command : list [str ]
16
+ command : List [str ]
16
17
17
18
def parse_args () -> Args :
18
19
parser = ArgumentParser (prog = "rules_opa::opa_signer" , description = "Tool to re-bundle an opa bundle with a signature file" )
You can’t perform that action at this time.
0 commit comments