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


      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:])
          with open(file_path, "rb") as fp:
            lines = deque(fp.readlines())
        elif line:
          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.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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: home-assistant/home-assistant
Commit Name: 35b388edcedb35915ba6e20308520a2224e2c8eb
Time: 2016-09-07
Author: paulus@paulusschoutsen.nl
File Name: homeassistant/components/group.py
Class Name:
Method Name: setup


Project Name: kengz/SLM-Lab
Commit Name: c9d0af542668df6fcaa51b5298237ea4a351f101
Time: 2020-02-23
Author: kengzwl@gmail.com
File Name: slm_lab/agent/__init__.py
Class Name: Body
Method Name: log_tensorboard