4794f58b5e766ff67d1d8304f08a43d545c1a14a,migrations/options/src/python/migrate_config.py,,check_config_file,#Any#,314

Before Change


                                      dst_key=green(dst_key), dst_section=section(dst_section)),
                                      file=sys.stderr)
      elif (src_section, src_key) not in notes:
        print("Found {src_key} in section {src_section} and there is no automated migration path"
              "for this option.  Please consult the "
              "codebase.".format(src_key=red(src_key), src_section=red(src_section)))

      if (src_section, src_key) in notes:
        print("  Note: {0}".format(yellow(notes[(src_section, src_key)])))

After Change


    check_option(cp, src, dst)

  // Special-case handling of artifact cache options, so we can sweep them up in all sections easily.
  artifact_cache_options = {
    "read_from_artifact_cache": "read",
    "write_to_artifact_cache": "write",
    "overwrite_cache_artifacts": "overwrite",
    "read_artifact_caches": "read_from",
    "write_artifact_caches": "write_to",
    "cache_compression": "compression_level",
  }
  for src_sec in ["DEFAULT"] + cp.sections():
    dst_sec = "cache" if src_sec == "DEFAULT" else "cache.{}".format(src_sec)
    for src_key, dst_key in artifact_cache_options.items():
      check_option(cp, (src_sec, src_key), (dst_sec, dst_key))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: pantsbuild/pants
Commit Name: 4794f58b5e766ff67d1d8304f08a43d545c1a14a
Time: 2015-06-23
Author: benjyw@gmail.com
File Name: migrations/options/src/python/migrate_config.py
Class Name:
Method Name: check_config_file


Project Name: aws/sagemaker-python-sdk
Commit Name: 502d6ebfcd698061cbdc1b369cb7ff449ff9db08
Time: 2018-06-04
Author: 6631887+laurenyu@users.noreply.github.com
File Name: tests/unit/test_estimator.py
Class Name:
Method Name: test_init_with_source_dir_s3


Project Name: arraiy/torchgeometry
Commit Name: 206798edabf99a8ee4bb03ffba25968d2057bb18
Time: 2020-07-30
Author: anguelos.nicolaou@gmail.com
File Name: setup.py
Class Name:
Method Name:


Project Name: dmlc/gluon-nlp
Commit Name: 93acf01986ddc7c7adc2d7134cea07fec1760d6f
Time: 2018-07-10
Author: szha@users.noreply.github.com
File Name: docs/conf.py
Class Name:
Method Name: