Skip to content

Commit

Permalink
Downgrade typing syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
daneah committed Nov 7, 2023
1 parent 0a93306 commit 17ab9b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ deps =
furo
sphinx
commands =
python --version
sphinx-apidoc \
--force \
--implicit-namespaces \
Expand Down
4 changes: 2 additions & 2 deletions src/repoman/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
import configparser
import sys
from pathlib import Path
from typing import NoReturn
from typing import NoReturn, Union


FAIL = "\033[91m"
ENDC = "\033[0m"
REPO_TYPES_CFG = "repo-types.cfg"


def check_if_allowed(path: Path) -> bool | NoReturn:
def check_if_allowed(path: Path) -> Union[bool, NoReturn]:
if REPO_TYPES_CFG not in (str(item) for item in path.iterdir()):
print(f"{FAIL}The current directory is not configured for repository management{ENDC}")
sys.exit(1)
Expand Down

0 comments on commit 17ab9b2

Please sign in to comment.