Skip to content

Commit

Permalink
Add back TODOs
Browse files Browse the repository at this point in the history
But remove a comment in pylint/rules.py that was a bit noisy. We use this pattern in a couple places, and I don't think it was helpful to spell it out in such detail. We've made improvements to the code itself to be a bit more obvious what is going on.

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
  • Loading branch information
Eric-Arellano committed Sep 24, 2020
1 parent 3225da2 commit dafc76b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src/python/pants/backend/python/goals/pytest_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ async def setup_pytest_for_target(
# by importlib_metadata and then by Pytest). See
# https://github.com/jaraco/zipp/pull/26.
"--not-zip-safe",
# TODO(John Sirois): Support shading python binaries:
# https://github.com/pantsbuild/pants/issues/9206
"--pex-path",
requirements_pex_request.input.output_filename,
),
Expand Down
6 changes: 2 additions & 4 deletions src/python/pants/backend/python/lint/pylint/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,6 @@ def generate_args(*, source_files: SourceFiles, pylint: Pylint) -> Tuple[str, ..

@rule(level=LogLevel.DEBUG)
async def pylint_lint_partition(partition: PylintPartition, pylint: Pylint) -> LintResult:
# We build one PEX with Pylint requirements (including any first-party plugins), and another
# with all direct 3rd-party dependencies. Splitting this into two PEXes gives us finer-grained
# caching. We then merge via `--pex-path`. We use `PexFromTargetsRequest.for_requirements()`
# to get cache hits with other goals like `test` and `repl`.
requirements_pex_request = Get(
Pex,
PexFromTargetsRequest,
Expand Down Expand Up @@ -141,6 +137,8 @@ async def pylint_lint_partition(partition: PylintPartition, pylint: Pylint) -> L
requirements=PexRequirements([*pylint.all_requirements, *plugin_requirements]),
entry_point=pylint.entry_point,
interpreter_constraints=partition.interpreter_constraints,
# TODO(John Sirois): Support shading python binaries:
# https://github.com/pantsbuild/pants/issues/9206
additional_args=("--pex-path", requirements_pex_request.input.output_filename),
),
)
Expand Down
2 changes: 0 additions & 2 deletions src/python/pants/backend/python/typecheck/mypy/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,6 @@ async def mypy_typecheck(
# Python 2 wheels and they are not compatible with Python 3, then Pex will error about
# missing wheels. So, in this case, we set `PEX_IGNORE_ERRORS`, which will avoid erroring,
# but may result in MyPy complaining that it cannot find certain distributions.
#
# * The runner Pex should use the same constraints as the tool Pex.
code_interpreter_constraints = PexInterpreterConstraints.create_from_compatibility_fields(
(
tgt[PythonInterpreterCompatibility]
Expand Down

0 comments on commit dafc76b

Please sign in to comment.