echoing-london-29138
02/25/2022, 2:22 PMbitter-ability-32190
02/25/2022, 2:26 PMechoing-london-29138
02/25/2022, 2:26 PMbitter-ability-32190
02/25/2022, 2:27 PMflake8
is simple enough to start there2.9.x
branch: https://github.com/pantsbuild/pants/tree/2.9.x/src/python/pants/backend/python/lintechoing-london-29138
02/25/2022, 2:27 PMbitter-ability-32190
02/25/2022, 2:28 PMechoing-london-29138
02/25/2022, 2:29 PMbitter-ability-32190
02/25/2022, 2:29 PMechoing-london-29138
02/25/2022, 2:48 PMbitter-ability-32190
02/25/2022, 2:49 PMechoing-london-29138
02/25/2022, 3:20 PMInative_engine.PantsdClientException: The pantsd process was killed during the run
bitter-ability-32190
02/25/2022, 3:21 PMwide-midnight-78598
02/25/2022, 3:48 PMansible check
plugin, and it might get you some of what you need (while probably not being the best example of canonical Pants code, to be fair)
https://github.com/sureshjoshi/pants-plugins/blob/226dd5b1cff1746feb3a55aa697600bb2248802f/pants-plugins/experimental/ansible/rules.py#L32-L80echoing-london-29138
02/25/2022, 4:15 PMModuleNotFoundError: No module named 'pants.testutil'
I’m trying to write integration test in order to be able to find my mistakewide-midnight-78598
02/25/2022, 4:18 PMechoing-london-29138
02/25/2022, 4:19 PMwide-midnight-78598
02/25/2022, 4:20 PMechoing-london-29138
02/25/2022, 4:23 PMwide-midnight-78598
02/25/2022, 4:23 PMechoing-london-29138
02/25/2022, 4:24 PMwide-midnight-78598
02/25/2022, 4:24 PMechoing-london-29138
02/25/2022, 4:25 PMpants_requirement(name="pants")
In directly in my plugin, but now I have this error
No module named ‘pants’wide-midnight-78598
02/25/2022, 4:25 PMbitter-ability-32190
02/25/2022, 4:26 PMwide-midnight-78598
02/25/2022, 4:29 PMbitter-ability-32190
02/25/2022, 4:29 PMpants.toml
block)wide-midnight-78598
02/25/2022, 4:31 PMI’ve added theIn directly in my plugin, but now I have this error Where exactly did you add that?pants_requirement(name="pants")
bitter-ability-32190
02/25/2022, 4:32 PMechoing-london-29138
02/25/2022, 4:34 PMwide-midnight-78598
02/25/2022, 4:35 PMechoing-london-29138
02/25/2022, 4:36 PMwide-midnight-78598
02/25/2022, 4:38 PMbitter-ability-32190
02/25/2022, 4:51 PMwide-midnight-78598
02/25/2022, 4:52 PMbitter-ability-32190
02/25/2022, 4:52 PMwide-midnight-78598
02/25/2022, 4:55 PMechoing-london-29138
02/25/2022, 5:08 PMpython_sources()
python_requirement(
name="pants.testutil",
modules=["pants.testutil"],
requirements=["pantsbuild.pants.testutil"],
)
python_tests(
name="rules_integration_test",
sources=["rules_integration_test.py"],
timeout=240,
)
wide-midnight-78598
02/25/2022, 5:09 PMhappy-kitchen-89482
02/25/2022, 7:24 PMechoing-london-29138
02/28/2022, 5:00 PMwide-midnight-78598
02/28/2022, 5:26 PMbitter-ability-32190
02/28/2022, 5:27 PMechoing-london-29138
02/28/2022, 5:27 PMwide-midnight-78598
02/28/2022, 5:28 PMechoing-london-29138
02/28/2022, 5:31 PMwide-midnight-78598
02/28/2022, 5:32 PMPythonLockfileRequest
? You import that, but I don't see it anywhere in the codebase (note: I'm working on your forked repo in the add_import _linter
branch)echoing-london-29138
02/28/2022, 5:54 PMwide-midnight-78598
02/28/2022, 5:55 PMechoing-london-29138
02/28/2022, 6:04 PMwide-midnight-78598
02/28/2022, 6:06 PMechoing-london-29138
02/28/2022, 6:24 PMwide-midnight-78598
02/28/2022, 6:25 PM./pants lint helloworld:
results in
13:39:16.18 [INFO] Completed: experimental.importlint.rules.run_myplugin_lint - importlinter succeeded.
=============
Import Linter
=============
---------
Contracts
---------
Analyzed 4 files, 2 dependencies.
---------------------------------
Contracts: 0 kept, 0 broken.
✓ black succeeded.
✓ flake8 succeeded.
✓ importlinter succeeded.
echoing-london-29138
02/28/2022, 6:40 PMwide-midnight-78598
02/28/2022, 6:44 PMbitter-ability-32190
02/28/2022, 6:44 PMwide-midnight-78598
02/28/2022, 6:45 PMechoing-london-29138
02/28/2022, 6:47 PMwide-midnight-78598
02/28/2022, 6:48 PMechoing-london-29138
02/28/2022, 7:11 PM