aboutsummaryrefslogtreecommitdiff
path: root/pw_cli
diff options
context:
space:
mode:
authorWyatt Hepler <hepler@google.com>2020-10-21 16:16:21 -0700
committerWyatt Hepler <hepler@google.com>2020-10-22 18:28:07 +0000
commitd7dc6550c95c4a39947bd091fb55fd58ccd13302 (patch)
tree68f9d567a7544d901f9eb5f756337835bcdfb791 /pw_cli
parentb8e1360e27b649c16db5c95c424b3a335aec1e7e (diff)
downloadpigweed-d7dc6550c95c4a39947bd091fb55fd58ccd13302.tar.gz
pw_build: pw_python_package and mypy fixes
- Use the target-relative path for pylint's stamp so it is unique when there are multiple files with the same basename (e.g. __init__.py). - Serialize pip install commands since in-parallel --editable installs do not work correctly. - Run mypy over the entire package directory rather than individual files. - Fix various mypy issues so that mypy passes without --ignore-missing-imports. Change-Id: I8129144d7c963616e5b836dd2f082c41f1dc1416 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/22201 Reviewed-by: Alexei Frolov <frolv@google.com>
Diffstat (limited to 'pw_cli')
-rw-r--r--pw_cli/py/pw_cli/process.py3
-rw-r--r--pw_cli/py/setup.py2
2 files changed, 3 insertions, 2 deletions
diff --git a/pw_cli/py/pw_cli/process.py b/pw_cli/py/pw_cli/process.py
index 825dc0815..a3e686b63 100644
--- a/pw_cli/py/pw_cli/process.py
+++ b/pw_cli/py/pw_cli/process.py
@@ -35,7 +35,8 @@ class CompletedProcess:
"""Information about a process executed in run_async."""
def __init__(self, process: 'asyncio.subprocess.Process',
output: Union[bytes, IO[bytes]]):
- self.returncode = process.returncode
+ assert process.returncode is not None
+ self.returncode: int = process.returncode
self.pid = process.pid
self._output = output
diff --git a/pw_cli/py/setup.py b/pw_cli/py/setup.py
index 94df754cf..d9a163bee 100644
--- a/pw_cli/py/setup.py
+++ b/pw_cli/py/setup.py
@@ -13,7 +13,7 @@
# the License.
"""pw_cli"""
-import setuptools
+import setuptools # type: ignore
setuptools.setup(
name='pw_cli',