98ae38f57c7a7a369604b4bb78d9879c4a990a24,mir_eval/chord.py,,validate_chord_label,#Any#,320
Before Change
"Received: "%s"" % (one_char, chord_label))
// Test for closed parens
parens = [paren in chord_label for paren in ["(", ")"]]
if any(parens) and not all(parens):
raise InvalidChordException(
"Chord label must have closed parentheses. "
"Received: "%s"" % chord_label)
def split(chord_label, reduce_extended_chords=False):
Parse a chord label into its four constituent parts:
- root
- quality shorthand
After Change
pattern = re.compile(r"""^((N|X)|(([A-G](b*|//*))((:(maj|min|dim|aug|1|5|sus2|sus4|maj6|min6|7|maj7|min7|dim7|hdim7|minmaj7|aug7|9|maj9|min9|11|maj11|min11|13|maj13|min13)(\((\*?((b*|//*)([1-9]|1[0-3]?))(,\*?((b*|//*)([1-9]|1[0-3]?)))*)\))?)|(:\((\*?((b*|//*)([1-9]|1[0-3]?))(,\*?((b*|//*)([1-9]|1[0-3]?)))*)\)))?((/((b*|//*)([1-9]|1[0-3]?)))?)?))$""") // nopep8
if not pattern.match(chord_label):
raise InvalidChordException("Invalid chord label: "
"{}".format(chord_label))
pass
def split(chord_label, reduce_extended_chords=False):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: craffel/mir_eval
Commit Name: 98ae38f57c7a7a369604b4bb78d9879c4a990a24
Time: 2017-03-17
Author: bmcfee@users.noreply.github.com
File Name: mir_eval/chord.py
Class Name:
Method Name: validate_chord_label
Project Name: Qiskit/qiskit-aqua
Commit Name: 2aae12b10a3411009a2802a077bb8c6c0365b6ad
Time: 2020-08-28
Author: 31178928+t-imamichi@users.noreply.github.com
File Name: qiskit/aqua/operators/converters/abelian_grouper.py
Class Name: AbelianGrouper
Method Name: group_subops
Project Name: GPflow/GPflow
Commit Name: a1a3a6a27e236464460d07fa7e0c4b605d094717
Time: 2017-08-17
Author: art.art.v@gmail.com
File Name: GPflow/_settings.py
Class Name:
Method Name: parse