c4289c6035f95f6e3964273ebf43dd1788a25a9a,perfkitbenchmarker/requirements.py,,_CheckRequirements,#Any#,27

Before Change


  
  try:
    with open(requirements_file_path, "rb") as fp:
      for line in fp:
        pkg_resources.require(line)
  except (pkg_resources.DistributionNotFound,
          pkg_resources.VersionConflict) as e:
    // In newer versions of setuptools, these exception classes have a report
    // method that provides a readable description of the error.

After Change


    requirements_file_path: string. Path to a pip requirements file.
  
  with open(requirements_file_path, "rb") as fp:
    requirements_to_check = [(requirements_file_path, deque(fp.readlines()))]
  try:
    while requirements_to_check:
      file_path, lines = requirements_to_check.pop()
      while lines:
        line = lines.popleft().strip()
        if line.startswith("-r"):
          requirements_to_check.append((file_path, lines))
          file_path = os.path.join(os.path.dirname(file_path), line[2:])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: c4289c6035f95f6e3964273ebf43dd1788a25a9a
Time: 2016-04-20
Author: skschneider@users.noreply.github.com
File Name: perfkitbenchmarker/requirements.py
Class Name:
Method Name: _CheckRequirements


Project Name: cornellius-gp/gpytorch
Commit Name: 303217b34070dc47a86622b62764098999b0d7f5
Time: 2018-12-12
Author: gpleiss@gmail.com
File Name: gpytorch/lazy/lazy_tensor.py
Class Name: LazyTensor
Method Name: _quad_form_derivative


Project Name: deepgram/kur
Commit Name: b2d8ee42f12c7d033bdeb929c9f38b3c90e48582
Time: 2017-03-23
Author: ajsyp@syptech.net
File Name: kur/kurfile.py
Class Name: Kurfile
Method Name: _parse_model