diff --git a/BUILD b/BUILD index c25a0c6..b426456 100644 --- a/BUILD +++ b/BUILD @@ -1,18 +1,18 @@ -load("@buildifier_prebuilt//:rules.bzl", "buildifier") +# load("@buildifier_prebuilt//:rules.bzl", "buildifier") package(default_visibility = ["//visibility:private"]) -buildifier( - name = "buildifier.check", - lint_mode = "warn", - mode = "diff", -) +# buildifier( +# name = "buildifier.check", +# lint_mode = "warn", +# mode = "diff", +# ) -buildifier( - name = "buildifier", - lint_mode = "fix", - mode = "fix", -) +# buildifier( +# name = "buildifier", +# lint_mode = "fix", +# mode = "fix", +# ) licenses(["notice"]) # MIT diff --git a/WORKSPACE b/WORKSPACE index 656f778..1039da1 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -14,10 +14,10 @@ mypy_integration_deps("//:current_mypy_version.txt") http_archive( name = "buildifier_prebuilt", - sha256 = "0450069a99db3d414eff738dd8ad4c0969928af13dc8614adbd1c603a835caad", - strip_prefix = "buildifier-prebuilt-0.4.0", + sha256 = "b3fd85ae7e45c2f36bce52cfdbdb6c20261761ea5928d1686edc8873b0d0dad0", + strip_prefix = "buildifier-prebuilt-5.1.0", urls = [ - "http://github.com/keith/buildifier-prebuilt/archive/0.4.0.tar.gz", + "https://github.com/keith/buildifier-prebuilt/archive/5.1.0.tar.gz", ], ) diff --git a/mypy/BUILD b/mypy/BUILD index 63bb405..2d4e31a 100644 --- a/mypy/BUILD +++ b/mypy/BUILD @@ -8,5 +8,7 @@ py_binary( visibility = ["//visibility:public"], deps = [ requirement("mypy"), + requirement("boto3-stubs"), + requirement("botocore-stubs"), ], ) diff --git a/mypy/main.py b/mypy/main.py index 04442ad..d1af920 100644 --- a/mypy/main.py +++ b/mypy/main.py @@ -1,7 +1,17 @@ import sys +import mypy.modulefinder from mypy.main import main if __name__ == '__main__': + additional_package_paths = [p for p in sys.path if 'pypi__' in p] + original_get_site_packages_dirs = mypy.modulefinder.get_site_packages_dirs + + def get_site_packages_dirs(*args, **kwargs): + egg_dirs, site_packages = original_get_site_packages_dirs(*args, **kwargs) + site_packages += tuple(additional_package_paths) + return egg_dirs, site_packages + + mypy.modulefinder.get_site_packages_dirs = get_site_packages_dirs main(None, sys.stdout, sys.stderr)