10b7a73b430ac277bbf52d3867dfe9f8ee0c9286,test/validate.py,,check_id_types,#,150

Before Change


  for key, value in legislator["id"].items():
    // Check that the id key is one we know about.
    if key not in id_types:
      error(context, rtyaml.dump({ key: value }) + " is not a valid id.")

    // Check that the data type is correct.
    elif not isinstance(value, id_types[key]):

After Change


  for key, value in legislator["id"].items():
    // Check that the id key is one we know about.
    if key not in id_types:
      error(context, rtyaml.dump({ key: value }).strip() + " is not a valid id.")

    // Check that the data type is correct.
    elif not isinstance(value, id_types[key]):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 3

Instances


Project Name: unitedstates/congress-legislators
Commit Name: 10b7a73b430ac277bbf52d3867dfe9f8ee0c9286
Time: 2021-01-01
Author: jt@occams.info
File Name: test/validate.py
Class Name:
Method Name: check_id_types


Project Name: unitedstates/congress-legislators
Commit Name: 10b7a73b430ac277bbf52d3867dfe9f8ee0c9286
Time: 2021-01-01
Author: jt@occams.info
File Name: test/validate.py
Class Name:
Method Name: check_leadership_roles


Project Name: unitedstates/congress-legislators
Commit Name: 10b7a73b430ac277bbf52d3867dfe9f8ee0c9286
Time: 2021-01-01
Author: jt@occams.info
File Name: test/validate.py
Class Name:
Method Name: check_name


Project Name: unitedstates/congress-legislators
Commit Name: 10b7a73b430ac277bbf52d3867dfe9f8ee0c9286
Time: 2021-01-01
Author: jt@occams.info
File Name: test/validate.py
Class Name:
Method Name: check_term


Project Name: unitedstates/congress-legislators
Commit Name: 10b7a73b430ac277bbf52d3867dfe9f8ee0c9286
Time: 2021-01-01
Author: jt@occams.info
File Name: test/validate.py
Class Name:
Method Name: check_executive_term


Project Name: unitedstates/congress-legislators
Commit Name: 10b7a73b430ac277bbf52d3867dfe9f8ee0c9286
Time: 2021-01-01
Author: jt@occams.info
File Name: test/validate.py
Class Name:
Method Name: check_bio