From 53f47fbafda6b91a1018b6bf2642226780fd1c11 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Sun, 1 Nov 2020 23:57:07 -0800 Subject: [PATCH] improve type annotations --- lethe.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lethe.py b/lethe.py index d0a4ab9..23f15e5 100755 --- a/lethe.py +++ b/lethe.py @@ -3,12 +3,12 @@ Git snapshotting tool """ +from typing import List, Union import subprocess import tempfile import datetime import argparse from itertools import chain -from typing import List import sys @@ -16,7 +16,7 @@ __author__ = 'Jan Petykeiwicz' __version__ = '0.8' -def _run(command: str or List[str], **kwargs): +def _run(command: Union[str, List[str]], **kwargs) -> str: """ Wrapper for subprocess.run(): - Accepts args as either a list of strings or space-delimited string