-
-
Notifications
You must be signed in to change notification settings - Fork 620
Open
Labels
Description
🐞 bug report
Affected Rule
The issue is caused by the rule: py_console_script_binary
Is this a regression?
I don't believe so.
Description
When running mypy on a py_console_script_binary
wrapping a pip package (in this case, black), I get an error:
bazel-out/k8-fastbuild/bin/[path in my repo]/rules_python_entry_point_black.py:19: error: "patched_main" does not return a value (it only ever returns None) [func-returns-value]
The issue is basically that the {entry_point}
being wrapped here may not have a return value.
🔬 Minimal Reproduction
I don't know if this is minimal enough for you, but:
git clone https://pigweed.googlesource.com/pigweed/pigweed
cd pigweed
git fetch https://pigweed.googlesource.com/pigweed/pigweed refs/changes/73/309473/1 && git checkout -b change-309473 FETCH_HEAD
bazelisk build --config=mypy //pw_presubmit/py:black
🔥 Exception or Error
bazel-out/k8-fastbuild/bin/[path in my repo]/rules_python_entry_point_black.py:19: error: "patched_main" does not return a value (it only ever returns None) [func-returns-value]
🌍 Your Environment
Operating System:
Linux
Output of bazel version
:
8.1.0
Rules_python version:
0.40.0
Anything else relevant?