c2950cb961523d2d884f2388eaee6d1ec511faea,src/python/pants/init/specs_calculator.py,SpecsCalculator,parse_specs,#Any#Any#Any#Any#Any#,38

Before Change


    Parse raw string specs into a Specs object.
    build_root = build_root or get_buildroot()
    spec_parser = CmdLineSpecParser(build_root)
    specs = OrderedSet(spec_parser.parse_spec(spec_str) for spec_str in raw_specs)
    address_specs = AddressSpecs(
      dependencies=(spec for spec in specs if isinstance(spec, AddressSpec)),
      exclude_patterns=exclude_patterns if exclude_patterns else tuple(),
      tags=tags,
    )
    filesystem_specs = FilesystemSpecs(
      spec for spec in specs if isinstance(spec, FilesystemSpec)
    )
    return Specs(address_specs=address_specs, filesystem_specs=filesystem_specs)

  @classmethod
  def changed_files(cls, scm, changes_since=None, diffspec=None):

After Change


    address_specs: OrderedSet = OrderedSet()
    filesystem_specs: OrderedSet = OrderedSet()
    for spec_str in raw_specs:
      parsed_spec = spec_parser.parse_spec(spec_str)
      if isinstance(parsed_spec, AddressSpec):
        address_specs.add(parsed_spec)
      else:
        filesystem_specs.add(parsed_spec)

    address_specs_collection = AddressSpecs(
      dependencies=address_specs,
      exclude_patterns=exclude_patterns if exclude_patterns else tuple(),
      tags=tags,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: pantsbuild/pants
Commit Name: c2950cb961523d2d884f2388eaee6d1ec511faea
Time: 2020-01-31
Author: ericarellano@me.com
File Name: src/python/pants/init/specs_calculator.py
Class Name: SpecsCalculator
Method Name: parse_specs


Project Name: pantsbuild/pants
Commit Name: 0ea28ad0dfa94411a51d8c666aa780d3f254d786
Time: 2014-10-02
Author: zundel@squareup.com
File Name: src/python/pants/backend/codegen/targets/java_protobuf_library.py
Class Name: JavaProtobufLibrary
Method Name: imports


Project Name: Theano/Theano
Commit Name: 24e7ed3b8f62fd702b2fea624189f93d145ad8b5
Time: 2017-05-30
Author: nouiz@nouiz.org
File Name: theano/gof/fg.py
Class Name: FunctionGraph
Method Name: orderings


Project Name: pantsbuild/pants
Commit Name: aa23024157360be890e9c50368ff54ca05ef7218
Time: 2019-05-18
Author: stuhood@gmail.com
File Name: src/python/pants/goal/context.py
Class Name: Context
Method Name: targets