Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mypy #235

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Mypy #235

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

test --test_output=errors

# Add mypy type-check validation actions to py_library targets.
# Disable for a particular build with --norun_validations
build --aspects=//tools:lint.bzl%mypy

# Define value used by tests
build --define=SOME_VAR=SOME_VALUE

# Use local rules_python
# Enable with --config=dev
common:dev --override_repository=rules_python=~/workspace/rules_python

# Load any settings specific to the current user.
# .bazelrc.user should appear in .gitignore so that settings are not shared with team members
# This needs to be last statement in this
Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
6.3.2
7.0.0
# The first line of this file is used by Bazelisk and Bazel to be sure
# the right version of Bazel is used to build and test this repo.
# This also defines which version is used on CI.
Expand Down
3 changes: 3 additions & 0 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ load("@rules_python_gazelle_plugin//modules_mapping:def.bzl", "modules_mapping")
load("@rules_python//python:defs.bzl", "py_runtime", "py_runtime_pair")
load("@rules_python//python/pip_install:requirements.bzl", "compile_pip_requirements")

exports_files(["mypy.ini"])

# gazelle:exclude internal_python_deps.bzl
# gazelle:exclude internal_deps.bzl
# gazelle:exclude py/tests/
Expand Down Expand Up @@ -37,6 +39,7 @@ compile_pip_requirements(
extra_args = ["--allow-unsafe"],
requirements_in = "requirements.in",
requirements_txt = "requirements.txt",
tags = ["skip-typecheck"],
)

modules_mapping(
Expand Down
11 changes: 10 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,13 @@ module(
# When bumping, add a comment explaining what's required from the newer release.
bazel_dep(name = "aspect_bazel_lib", version = "1.38.1")
bazel_dep(name = "bazel_skylib", version = "1.4.2")
bazel_dep(name = "rules_python", version = "0.19.0")
# This is the minimum version that includes
# feat(pip): provide pypi -> whl target mapping in requirements.bzl by @alexeagle in #1532
bazel_dep(name = "rules_python", version = "0.27.0")

bazel_dep(name = "rules_testing", version = "0.5.0", dev_dependency = True)

python = use_extension("@rules_python//python/extensions:python.bzl", "python", dev_dependency = True)
python.toolchain(
python_version = "3.9",
)
Loading
Loading