1121290a9fe851ebbf9647f44bfa8f58f4e115b6,src/python/pants/backend/python/lint/docformatter/rules.py,,setup,#Any#Any#Any#Any#,67

Before Change


    subprocess_encoding_environment: SubprocessEncodingEnvironment,
) -> Setup:
    adaptor_with_origin = request.target.adaptor_with_origin
    adaptor = adaptor_with_origin.adaptor

    requirements_pex = await Get[Pex](
        CreatePex(
            output_filename="docformatter.pex",
            requirements=PexRequirements(requirements=tuple(docformatter.get_requirement_specs())),
            interpreter_constraints=PexInterpreterConstraints(
                constraint_set=tuple(docformatter.default_interpreter_constraints)
            ),
            entry_point=docformatter.get_entry_point(),
        )
    )

    if request.target.prior_formatter_result is None:
        all_source_files = await Get[SourceFiles](AllSourceFilesRequest([adaptor]))
        all_source_files_snapshot = all_source_files.snapshot
    else:
        all_source_files_snapshot = request.target.prior_formatter_result

    specified_source_files = await Get[SourceFiles](
        SpecifiedSourceFilesRequest([adaptor_with_origin])
    )

    merged_input_files = await Get[Digest](
        DirectoriesToMerge(
            directories=(

After Change


    )

    if request.targets.prior_formatter_result is None:
        all_source_files = await Get[SourceFiles](
            AllSourceFilesRequest(
                adaptor_with_origin.adaptor for adaptor_with_origin in adaptors_with_origins
            )
        )
        all_source_files_snapshot = all_source_files.snapshot
    else:
        all_source_files_snapshot = request.targets.prior_formatter_result

    specified_source_files = await Get[SourceFiles](
        SpecifiedSourceFilesRequest(adaptors_with_origins)
    )

    merged_input_files = await Get[Digest](
        DirectoriesToMerge(
            directories=(
                all_source_files_snapshot.directory_digest,
                requirements_pex.directory_digest,
            )
        ),
    )

    address_references = ", ".join(
        sorted(
            adaptor_with_origin.adaptor.address.reference()
            for adaptor_with_origin in adaptors_with_origins
        )
    )

    process_request = requirements_pex.create_execute_request(
        python_setup=python_setup,
        subprocess_encoding_environment=subprocess_encoding_environment,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 29

Instances


Project Name: pantsbuild/pants
Commit Name: 1121290a9fe851ebbf9647f44bfa8f58f4e115b6
Time: 2020-02-27
Author: ericarellano@me.com
File Name: src/python/pants/backend/python/lint/docformatter/rules.py
Class Name:
Method Name: setup


Project Name: pantsbuild/pants
Commit Name: 1121290a9fe851ebbf9647f44bfa8f58f4e115b6
Time: 2020-02-27
Author: ericarellano@me.com
File Name: src/python/pants/backend/python/lint/black/rules.py
Class Name:
Method Name: setup


Project Name: pantsbuild/pants
Commit Name: 1121290a9fe851ebbf9647f44bfa8f58f4e115b6
Time: 2020-02-27
Author: ericarellano@me.com
File Name: src/python/pants/backend/python/lint/isort/rules.py
Class Name:
Method Name: setup


Project Name: pantsbuild/pants
Commit Name: 1121290a9fe851ebbf9647f44bfa8f58f4e115b6
Time: 2020-02-27
Author: ericarellano@me.com
File Name: src/python/pants/backend/python/lint/docformatter/rules.py
Class Name:
Method Name: setup