Skip to content

Commit

Permalink
Make build and test targets under python/compat strict.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 528182417
  • Loading branch information
fionalang authored and tensorflower-gardener committed Apr 29, 2023
1 parent 4ec20d5 commit cd3a262
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tensorflow/python/compat/BUILD
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
load("//tensorflow:tensorflow.default.bzl", "tf_py_test")
load("//tensorflow:strict.default.bzl", "py_strict_library")
load("//tensorflow:tensorflow.default.bzl", "tf_py_strict_test")

package(
# copybara:uncomment default_applicable_licenses = ["//tensorflow:license"],
licenses = ["notice"],
)

py_library(
py_strict_library(
name = "v2_compat",
srcs = ["v2_compat.py"],
srcs_version = "PY3",
visibility = ["//tensorflow:internal"],
deps = [
"//tensorflow/python:control_flow_v2_toggles",
"//tensorflow/python:framework_ops",
"//tensorflow/python:tensor_shape",
"//tensorflow/python:tf2",
"//tensorflow/python:variable_scope",
"//tensorflow/python/data/experimental/ops:counter",
Expand All @@ -23,43 +22,44 @@ py_library(
"//tensorflow/python/data/ops:dataset_ops",
"//tensorflow/python/data/ops:readers",
"//tensorflow/python/eager:monitoring",
"//tensorflow/python/framework:ops",
"//tensorflow/python/framework:tensor_shape",
"//tensorflow/python/util:tf_export",
],
)

py_library(
py_strict_library(
name = "compat",
srcs = ["compat.py"],
srcs_version = "PY3",
visibility = ["//tensorflow:internal"],
deps = [
"//tensorflow/python/platform:tf_logging",
"//tensorflow/python/util:tf_decorator",
"//tensorflow/python/util:tf_export",
],
)

tf_py_test(
tf_py_strict_test(
name = "compat_test",
size = "small",
srcs = ["compat_test.py"],
tags = ["nofwdcompat"],
deps = [
":compat",
"//tensorflow/python:client_testlib",
"//tensorflow/python:control_flow_v2_toggles",
"//tensorflow/python:framework_ops",
"//tensorflow/python:tensor_shape",
"//tensorflow/python:variable_scope",
],
)

tf_py_test(
tf_py_strict_test(
name = "disable_v2_behavior_test",
size = "small",
srcs = ["disable_v2_behavior_test.py"],
deps = [
":v2_compat",
"//tensorflow/python:client_testlib",
"//tensorflow/python:framework",
"//tensorflow/python/framework:constant_op",
"//tensorflow/python/framework:ops",
"//tensorflow/python/platform:_pywrap_tf2",
],
)

0 comments on commit cd3a262

Please sign in to comment.