aboutsummaryrefslogtreecommitdiff
path: root/tools/interface_generator/private/defs.bzl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/interface_generator/private/defs.bzl')
-rw-r--r--tools/interface_generator/private/defs.bzl15
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/interface_generator/private/defs.bzl b/tools/interface_generator/private/defs.bzl
index 080f19a..8e2ae8d 100644
--- a/tools/interface_generator/private/defs.bzl
+++ b/tools/interface_generator/private/defs.bzl
@@ -1,15 +1,19 @@
load("@pip//:requirements.bzl", "requirement")
-def py_pytest(name, srcs, deps = [], **kwargs):
+def py_pytest(name, srcs, deps = [], data = [], **kwargs):
native.py_test(
name = name,
srcs = ["//private:pytest_wrapper.py"],
main = "//private:pytest_wrapper.py",
- data = srcs,
+ legacy_create_init = False,
+ imports = ["."],
args = [
+ "--capture=no",
"--black",
"--pylint",
- #"--mypy",
+ "--pylint-rcfile=$(location //private:pylintrc)",
+ "--mypy",
+ "--mypy-config-file=$(location //private:mypyrc)",
] + ["$(location :%s)" % x for x in srcs],
deps = [
requirement("pytest"),
@@ -17,6 +21,9 @@ def py_pytest(name, srcs, deps = [], **kwargs):
requirement("pytest-pylint"),
requirement("pytest-mypy"),
] + deps,
+ data = [
+ "//private:mypyrc",
+ "//private:pylintrc",
+ ] + srcs + data,
**kwargs
)
-