fix: enable and fix full type checking (#509)

* fix: enable and fix fully type checking

* chore: pre-commit autoupdate

* refactor: pull types out to file
This commit is contained in:
Henry Schreiner
2021-01-02 14:32:55 -05:00
committed by GitHub
parent bc8716c188
commit 2a73fee411
12 changed files with 110 additions and 87 deletions
+4 -3
View File
@@ -8,14 +8,15 @@ from enum import Enum
from fnmatch import fnmatch
from pathlib import Path
from time import sleep
from typing import Dict, List, NamedTuple, Optional, Union
from typing import Dict, List, NamedTuple, Optional
import certifi
from .environment import ParsedEnvironment
from .typing import PathOrStr
def prepare_command(command: str, **kwargs: Union[str, os.PathLike]) -> str:
def prepare_command(command: str, **kwargs: PathOrStr) -> str:
'''
Preprocesses a command by expanding variables like {python}.
@@ -119,7 +120,7 @@ class DependencyConstraints:
else:
return self.base_file_path
def __repr__(self):
def __repr__(self) -> str:
return f'{self.__class__.__name__}{self.base_file_path!r})'