We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0a93306 commit 17ab9b2Copy full SHA for 17ab9b2
2 files changed
setup.cfg
@@ -101,6 +101,7 @@ deps =
101
furo
102
sphinx
103
commands =
104
+ python --version
105
sphinx-apidoc \
106
--force \
107
--implicit-namespaces \
src/repoman/cli.py
@@ -4,15 +4,15 @@
4
import configparser
5
import sys
6
from pathlib import Path
7
-from typing import NoReturn
+from typing import NoReturn, Union
8
9
10
FAIL = "\033[91m"
11
ENDC = "\033[0m"
12
REPO_TYPES_CFG = "repo-types.cfg"
13
14
15
-def check_if_allowed(path: Path) -> bool | NoReturn:
+def check_if_allowed(path: Path) -> Union[bool, NoReturn]:
16
if REPO_TYPES_CFG not in (str(item) for item in path.iterdir()):
17
print(f"{FAIL}The current directory is not configured for repository management{ENDC}")
18
sys.exit(1)
0 commit comments