pw_build: Python Mypy updates
- Pass all files to Mypy rather than the directory, in case tests
happen to reside at different paths.
- Remove unnecessary aliases of packet_pb2 members.
- Move Python requirements that apply throughout the Python build from
pw_presubmit to a pw_python_requirements target in pw_build.
- Update to Mypy 0.800 and mypy-protobuf 2.2.
Change-Id: I07ea07fb864ca4cd79fa5c0389e03146eca2b755
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/31600
Reviewed-by: Rob Mohr <mohrr@google.com>
diff --git a/pw_build/BUILD.gn b/pw_build/BUILD.gn
index d30bbc9..ab0f9f5 100644
--- a/pw_build/BUILD.gn
+++ b/pw_build/BUILD.gn
@@ -14,6 +14,7 @@
import("//build_overrides/pigweed.gni")
+import("$dir_pw_build/python.gni")
import("$dir_pw_docgen/docs.gni")
# IMPORTANT: The compilation flags in this file must be kept in sync with
@@ -124,6 +125,14 @@
depth = 1
}
+# Requirements for the pw_python_package lint targets.
+pw_python_requirements("python_lint") {
+ requirements = [
+ "mypy==0.800",
+ "pylint==2.6.0",
+ ]
+}
+
pw_doc_group("docs") {
sources = [ "docs.rst" ]
}