fix(entry_point): ignore type lints on the generated files#3736
fix(entry_point): ignore type lints on the generated files#3736aignas merged 3 commits intobazel-contrib:mainfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds a # type: ignore comment to generated console scripts to skip mypy type checking. Feedback indicates that the comment's placement on a separate line is syntactically incorrect for mypy and highlights a discrepancy between the changelog's description and the actual code implementation.
| * (entry_point) From now on `mypy` type checking will be skipped on the generated | ||
| files ([#3126](https://github.com/bazel-contrib/rules_python/issues/3126)). |
There was a problem hiding this comment.
This entry states that type checking will be skipped on the "generated files", implying the entire file. However, the current implementation in py_console_script_gen.py only targets a single line in the entry point script. If the goal is to ignore the whole file, the implementation should be updated to use a file-level ignore at the top of the generated script. If only the sys.exit line is intended to be ignored, this description should be clarified.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Fixes #3126