9228ad83a3ecde2fb5a714d1eb43c7c1ee2e200b,src/python/pants/backend/python/lint/bandit/rules.py,,bandit_lint,#Any#Any#Any#Any#,48
Before Change
if bandit.options.skip:
return LintResult.noop()
adaptors_with_origins = linter.adaptors_with_origins
// NB: Bandit output depends upon which Python interpreter version it"s run with. We ensure that
// each target runs with its own interpreter constraints. See
// https://github.com/PyCQA/bandit//under-which-version-of-python-should-i-install-bandit.
interpreter_constraints = PexInterpreterConstraints.create_from_adaptors(
(adaptor_with_origin.adaptor for adaptor_with_origin in adaptors_with_origins),
python_setup=python_setup,
)
requirements_pex = await Get[Pex](
PexRequest(
output_filename="bandit.pex",
requirements=PexRequirements(bandit.get_requirement_specs()),
interpreter_constraints=interpreter_constraints,
entry_point=bandit.get_entry_point(),
)
)
config_path: Optional[str] = bandit.options.config
config_snapshot = await Get[Snapshot](
PathGlobs(
globs=tuple([config_path] if config_path else []),
glob_match_error_behavior=GlobMatchErrorBehavior.error,
description_of_origin="the option `--bandit-config`",
)
)
all_source_files = await Get[SourceFiles](
LegacyAllSourceFilesRequest(
adaptor_with_origin.adaptor for adaptor_with_origin in adaptors_with_origins
)
)
specified_source_files = await Get[SourceFiles](
LegacySpecifiedSourceFilesRequest(adaptors_with_origins)
)
merged_input_files = await Get[Digest](
DirectoriesToMerge(
directories=(
all_source_files.snapshot.directory_digest,
requirements_pex.directory_digest,
config_snapshot.directory_digest,
)
),
)
address_references = ", ".join(
sorted(
adaptor_with_origin.adaptor.address.reference()
for adaptor_with_origin in adaptors_with_origins
)
)
request = requirements_pex.create_execute_request(
After Change
all_source_files = await Get[SourceFiles](
AllSourceFilesRequest(config.sources for config in configs)
)
specified_source_files = await Get[SourceFiles](
SpecifiedSourceFilesRequest((config.sources, config.origin) for config in configs)
)
merged_input_files = await Get[Digest](
DirectoriesToMerge(
directories=(
all_source_files.snapshot.directory_digest,
requirements_pex.directory_digest,
config_snapshot.directory_digest,
)
),
)
address_references = ", ".join(sorted(config.address.reference() for config in configs))
request = requirements_pex.create_execute_request(
python_setup=python_setup,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 17
Instances
Project Name: pantsbuild/pants
Commit Name: 9228ad83a3ecde2fb5a714d1eb43c7c1ee2e200b
Time: 2020-04-15
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/lint/bandit/rules.py
Class Name:
Method Name: bandit_lint
Project Name: pantsbuild/pants
Commit Name: 9228ad83a3ecde2fb5a714d1eb43c7c1ee2e200b
Time: 2020-04-15
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/lint/black/rules.py
Class Name:
Method Name: setup
Project Name: pantsbuild/pants
Commit Name: 9228ad83a3ecde2fb5a714d1eb43c7c1ee2e200b
Time: 2020-04-15
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/lint/isort/rules.py
Class Name:
Method Name: setup
Project Name: pantsbuild/pants
Commit Name: 9228ad83a3ecde2fb5a714d1eb43c7c1ee2e200b
Time: 2020-04-15
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/lint/bandit/rules.py
Class Name:
Method Name: bandit_lint