File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change
1
+ from __future__ import annotations
2
+
1
3
import os
2
4
import subprocess
3
5
from collections .abc import Mapping
4
- from typing import NamedTuple , Union
6
+ from typing import NamedTuple
5
7
6
8
from charset_normalizer import from_bytes
7
9
@@ -29,7 +31,7 @@ def _try_decode(bytes_: bytes) -> str:
29
31
raise CharacterSetDecodeError () from e
30
32
31
33
32
- def run (cmd : str , env : Union [ Mapping [str , str ], None ] = None ) -> Command :
34
+ def run (cmd : str , env : Mapping [str , str ] | None = None ) -> Command :
33
35
if env is not None :
34
36
env = {** os .environ , ** env }
35
37
process = subprocess .Popen (
Original file line number Diff line number Diff line change 1
1
import os
2
2
import re
3
3
import tempfile
4
- from typing import Union
5
4
6
5
from commitizen import git
7
6
from commitizen .cz import exceptions
8
7
9
8
_RE_LOCAL_VERSION = re .compile (r"\+.+" )
10
9
11
10
12
- def required_validator (answer : str , msg : Union [ str , None ] = None ) -> str :
11
+ def required_validator (answer : str , msg : object = None ) -> str :
13
12
if not answer :
14
13
raise exceptions .AnswerRequiredError (msg )
15
14
return answer
You can’t perform that action at this time.
0 commit comments