Skip to content

Releases: bazel-contrib/bazel-mypy-integration

0.4.0

13 Jun 17:50
ad1d482
Compare
Choose a tag to compare

WORKSPACE snippet:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "mypy_integration",
    sha256 = "cf94c102fbaccb587eea8de5cf1cb7f55c5c74396a2468932c3a2a4df989aa1d",
    strip_prefix = "bazel-mypy-integration-0.4.0",
    url = "https://github.com/thundergolfer/bazel-mypy-integration/archive/refs/tags/0.4.0.tar.gz",
)

load(
    "@mypy_integration//repositories:repositories.bzl",
    mypy_integration_repositories = "repositories",
)
mypy_integration_repositories()

load("@mypy_integration//:config.bzl", "mypy_configuration")
# Optionally pass a MyPy config file, otherwise pass no argument.
mypy_configuration("//tools/typing:mypy.ini")

load("@mypy_integration//repositories:deps.bzl", mypy_integration_deps = "deps")

mypy_integration_deps(
    mypy_requirements_file="//tools/typing:mypy_version.txt",
    # python_interpreter = "python3.9"  # /home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin is searched for exe.
    # OR
    # python_interpreter_target = "@python3_interpreter//:bin/python3",
)

What's Changed

New Contributors

Full Changelog: 0.3.0...0.4.0

0.3.0

25 Apr 15:27
Compare
Choose a tag to compare

WORKSPACE snippet:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "mypy_integration",
    sha256 = "fc42524d636b138a1940780deb680cdbf318cda84b14b4b3e3ba3b715e2480cf",
    strip_prefix = "bazel-mypy-integration-0.3.0",
    url = "https://github.com/thundergolfer/bazel-mypy-integration/archive/refs/tags/0.3.0.tar.gz",
)

load(
    "@mypy_integration//repositories:repositories.bzl",
    mypy_integration_repositories = "repositories",
)
mypy_integration_repositories()

load("@mypy_integration//:config.bzl", "mypy_configuration")
# Optionally pass a MyPy config file, otherwise pass no argument.
mypy_configuration("//tools/typing:mypy.ini")

load("@mypy_integration//repositories:deps.bzl", mypy_integration_deps = "deps")

mypy_integration_deps(
    mypy_requirements_file="//tools/typing:mypy_version.txt",
    # python_interpreter = "python3.9"  # /home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin is searched for exe.
    # OR
    # python_interpreter_target = "@python3_interpreter//:bin/python3",
)

What's Changed

New Contributors

Full Changelog: 0.2.1...0.3.0

0.2.1

28 Sep 05:02
Compare
Choose a tag to compare
  • 0.790 is now default MyPy version, to ensure compatibility with Python 3.9

0.2.0

27 Jun 03:37
b35f54d
Compare
Choose a tag to compare

Changes

  • Can now override the Python interpreter used in py_repositories:py_deps.bzl to install the MyPy dependencies. Use either python_interpreter (path) or python_interpreter_target (label).

Compatibility with rules_python 0.1.0

22 Oct 12:13
Compare
Choose a tag to compare
Pre-release
version 0.1.0 (handling newer rules_python API)

Fix: Handle empty py_library targets

19 Jul 09:58
Compare
Choose a tag to compare
Pre-release

Fixes an edge-case like the following, which in 0.0.9 failed when the Aspect was run on it:

py_library(
    name = "foo",
    srcs = [],
    deps = [":bar"],
)

The error seen was:

The following files have no generating action:
test/empty_srcs_lib_dummy_out
test/empty_srcs_lib_mypy_exe

Better handling of generated python files

19 Jul 06:36
Compare
Choose a tag to compare

Previously this integration would fail with an error message including something like "darwin-fastbuild is not a valid Python package name" if generated files were included in a py_* target.

This was most prominently a blocker on using this integration with python_proto_library, because the Protobuf-generated Python modules have a Bazel File.root of bazel-out/<platform>/bin, where <platform> is a hyphenated string like "darwin-fastbuild".

Distribution using rules_pkgs, fix bug

18 Jul 12:51
Compare
Choose a tag to compare
Pre-release

TODO

Support py_binary's 'imports' attr

27 Jan 09:18
b5ff484
Compare
Choose a tag to compare
Pre-release

Fixes issue described in #8

Make integration less noisy in Bazel logs

28 Jan 07:47
4932c72
Compare
Choose a tag to compare
0.0.6

Makes integration much less noisy in Bazel console logs