bitter-ability-32190
05/04/2022, 4:12 PMmypy
on some plugin code I'm seeing a puzzling error:
pants-plugins/mypy_is_a_linter/register.py:4: error: Module
'pants.backend.python.typecheck.mypy' has no attribute 'skip_field'
from pants.backend.python.typecheck.mypy import skip_field, subsystem
^
pants-plugins/mypy_is_a_linter/register.py:13: error: Module
'pants.backend.python.util_rules' has no attribute 'pex_from_targets'
from pants.backend.python.util_rules import pex_from_targets
Running ./pants --no-process-cleanup lint pants-plugins/mypy_is_a_linter/register.py
I can crack open the pantsbuild
.whl
and see the file therehundreds-father-404
05/04/2022, 4:14 PMhundreds-father-404
05/04/2022, 4:14 PMbitter-ability-32190
05/04/2022, 4:14 PMhundreds-father-404
05/04/2022, 4:15 PMbitter-ability-32190
05/04/2022, 4:16 PMfrom pants.backend.python.typecheck.mypy import skip_field, subsystem
from pants.backend.python.typecheck.mypy.rules import (
MyPyPartition,
MyPyPartitions,
MyPyRequest,
mypy_determine_partitions,
mypy_typecheck_partition,
)
from pants.backend.python.typecheck.mypy.subsystem import MyPy
from pants.backend.python.util_rules import pex_from_targets
from pants.core.goals.check import CheckResult
from pants.core.goals.lint import LintResults, LintTargetsRequest
from pants.engine.rules import Get, MultiGet, collect_rules, rule
from pants.engine.unions import UnionRule
from pants.util.logging import LogLevel
bitter-ability-32190
05/04/2022, 4:21 PMbitter-ability-32190
05/04/2022, 4:21 PMfrom pants.backend.python.typecheck.mypy.skip_field import rules as skip_rules
worksbitter-ability-32190
05/04/2022, 4:23 PMhundreds-father-404
05/04/2022, 4:23 PMbitter-ability-32190
05/04/2022, 4:37 PM__init__.py
file to the pants
package root fixes thishundreds-father-404
05/04/2022, 4:38 PMbitter-ability-32190
05/04/2022, 4:38 PMhundreds-father-404
05/04/2022, 4:39 PMbitter-ability-32190
05/04/2022, 4:40 PMsubsystem
. another file in the same dirbitter-ability-32190
05/04/2022, 4:44 PMbitter-ability-32190
05/04/2022, 4:49 PMsubsytem
is the import from subsystem
below. Removing that makes this reproduce on subsystem
.