Skip to content

Commit 65f4c6e

Browse files
authored
refactor: rename symbols in re-exports (#3300)
A followup to #3282 to finish up the cleanup and remove the unnecessary `starlark` usage in naming.
1 parent 726ffa2 commit 65f4c6e

File tree

8 files changed

+15
-29
lines changed

8 files changed

+15
-29
lines changed

python/py_binary.bzl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,9 @@
1414

1515
"""Public entry point for py_binary."""
1616

17-
load("//python/private:py_binary_macro.bzl", _starlark_py_binary = "py_binary")
17+
load("//python/private:py_binary_macro.bzl", _py_binary = "py_binary")
1818
load("//python/private:register_extension_info.bzl", "register_extension_info")
1919

20-
# buildifier: disable=native-python
21-
_py_binary_impl = _starlark_py_binary
22-
2320
def py_binary(**attrs):
2421
"""Creates an executable Python program.
2522
@@ -40,7 +37,7 @@ def py_binary(**attrs):
4037
if attrs.get("srcs_version") in ("PY2", "PY2ONLY"):
4138
fail("Python 2 is no longer supported: https://github.com/bazel-contrib/rules_python/issues/886")
4239

43-
_py_binary_impl(**attrs)
40+
_py_binary(**attrs)
4441

4542
register_extension_info(
4643
extension = py_binary,

python/py_cc_link_params_info.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Public entry point for PyCcLinkParamsInfo."""
22

3-
load("//python/private:py_cc_link_params_info.bzl", _starlark_PyCcLinkParamsInfo = "PyCcLinkParamsInfo")
3+
load("//python/private:py_cc_link_params_info.bzl", _PyCcLinkParamsInfo = "PyCcLinkParamsInfo")
44

5-
PyCcLinkParamsInfo = _starlark_PyCcLinkParamsInfo
5+
PyCcLinkParamsInfo = _PyCcLinkParamsInfo

python/py_info.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414

1515
"""Public entry point for PyInfo."""
1616

17-
load("//python/private:py_info.bzl", _starlark_PyInfo = "PyInfo")
17+
load("//python/private:py_info.bzl", _PyInfo = "PyInfo")
1818

19-
PyInfo = _starlark_PyInfo
19+
PyInfo = _PyInfo

python/py_library.bzl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,9 @@
1414

1515
"""Public entry point for py_library."""
1616

17-
load("//python/private:py_library_macro.bzl", _starlark_py_library = "py_library")
17+
load("//python/private:py_library_macro.bzl", _py_library = "py_library")
1818
load("//python/private:register_extension_info.bzl", "register_extension_info")
1919

20-
# buildifier: disable=native-python
21-
_py_library_impl = _starlark_py_library
22-
2320
def py_library(**attrs):
2421
"""Creates an executable Python program.
2522
@@ -37,7 +34,7 @@ def py_library(**attrs):
3734
if attrs.get("srcs_version") in ("PY2", "PY2ONLY"):
3835
fail("Python 2 is no longer supported: https://github.com/bazel-contrib/rules_python/issues/886")
3936

40-
_py_library_impl(**attrs)
37+
_py_library(**attrs)
4138

4239
register_extension_info(
4340
extension = py_library,

python/py_runtime.bzl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414

1515
"""Public entry point for py_runtime."""
1616

17-
load("//python/private:py_runtime_macro.bzl", _starlark_py_runtime = "py_runtime")
18-
19-
# buildifier: disable=native-python
20-
_py_runtime_impl = _starlark_py_runtime
17+
load("//python/private:py_runtime_macro.bzl", _py_runtime = "py_runtime")
2118

2219
def py_runtime(**attrs):
2320
"""Creates an executable Python program.
@@ -38,4 +35,4 @@ def py_runtime(**attrs):
3835
if attrs.get("python_version") == "PY2":
3936
fail("Python 2 is no longer supported: see https://github.com/bazel-contrib/rules_python/issues/886")
4037

41-
_py_runtime_impl(**attrs)
38+
_py_runtime(**attrs)

python/py_runtime_info.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414

1515
"""Public entry point for PyRuntimeInfo."""
1616

17-
load("//python/private:py_runtime_info.bzl", _starlark_PyRuntimeInfo = "PyRuntimeInfo")
17+
load("//python/private:py_runtime_info.bzl", _PyRuntimeInfo = "PyRuntimeInfo")
1818

19-
PyRuntimeInfo = _starlark_PyRuntimeInfo
19+
PyRuntimeInfo = _PyRuntimeInfo

python/py_runtime_pair.bzl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414

1515
"""Public entry point for py_runtime_pair."""
1616

17-
load("//python/private:py_runtime_pair_macro.bzl", _starlark_impl = "py_runtime_pair")
18-
19-
_py_runtime_pair = _starlark_impl
17+
load("//python/private:py_runtime_pair_macro.bzl", _py_runtime_pair = "py_runtime_pair")
2018

2119
# NOTE: This doc is copy/pasted from the builtin py_runtime_pair rule so our
2220
# doc generator gives useful API docs.

python/py_test.bzl

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,9 @@
1414

1515
"""Public entry point for py_test."""
1616

17-
load("//python/private:py_test_macro.bzl", _starlark_py_test = "py_test")
17+
load("//python/private:py_test_macro.bzl", _py_test = "py_test")
1818
load("//python/private:register_extension_info.bzl", "register_extension_info")
1919

20-
# buildifier: disable=native-python
21-
_py_test_impl = _starlark_py_test
22-
2320
def py_test(**attrs):
2421
"""Creates an executable Python program.
2522
@@ -41,7 +38,7 @@ def py_test(**attrs):
4138
fail("Python 2 is no longer supported: https://github.com/bazel-contrib/rules_python/issues/886")
4239

4340
# buildifier: disable=native-python
44-
_py_test_impl(**attrs)
41+
_py_test(**attrs)
4542

4643
register_extension_info(
4744
extension = py_test,

0 commit comments

Comments
 (0)