diff options
author | Chris Matthews <cmatthews5@apple.com> | 2018-02-01 00:33:15 +0000 |
---|---|---|
committer | Chris Matthews <cmatthews5@apple.com> | 2018-02-01 00:33:15 +0000 |
commit | bcc3c05c58f79666e90ac61c4b361372c562fe9e (patch) | |
tree | dd07aa94619bfaa34941c329b3ac74a9d61e212b | |
parent | ea57dc47e072e3b4387642732c772738bb1011a8 (diff) |
Some linting nits
git-svn-id: https://llvm.org/svn/llvm-project/zorg/trunk@323936 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | dep/dep.py | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -28,9 +28,9 @@ import subprocess try: - from typing import List, Text, Union, Dict, Type, Optional + # noinspection PyUnresolvedReferences + from typing import List, Text, Union, Dict, Type, Optional # noqa except ImportError as e: - Optional = Type = Dict = List = Text = Union = None pass # Not really needed at runtime, so okay to not have installed. @@ -156,7 +156,7 @@ class MalformedDependency(Exception): def brew_cmd(command): - # type: (List[Text]) -> Dict[Text, object] + # type: (List[Text]) -> List[Dict[Text, object]] """Help run a brew command, and parse the output. Brew has a json output option which we use. Run the command and parse the stdout @@ -429,7 +429,8 @@ class Sdk(Dependency): """Verify and Inject Sdk version dependencies.""" # sdk <operator> <version>. Operator may not have spaces around it. - sdk_dep_re = re.compile(r'(?P<command>\w+)\s+(?P<sdk>[\w/.]+)\s*(?P<operator>>=|<=|==)\s*(?P<version_text>[\d.-_]+)') + sdk_dep_re = re.compile(r'(?P<command>\w+)\s+(?P<sdk>[\w/.]+)\s*' + r'(?P<operator>>=|<=|==)\s*(?P<version_text>[\d.-_]+)') def __init__(self, line, kind): # type: (Line, Text) -> None @@ -485,7 +486,7 @@ class Sdk(Dependency): installed_sdks[name].append(version) if self.sdk not in installed_sdks.keys(): - raise MissingDependencyError("{} not found in installed SDKs.".format(self.sdk)) + raise MissingDependencyError(self, "{} not found in installed SDKs.".format(self.sdk)) self.installed_version = installed_sdks[self.sdk] |