Currently checking for invalid class and attribute names happens in at least two different places and makes no use of any good logic. See if there's an easy regex or similar to sort out illegal names (starting with digit or special character) as well as discarding any attributes and class names that double with Python internal reserved words.
Fixed in 0de562afe81eb2849f06898e8e49d18e28d35418 - now using keyword.iskeyword() and str.isidentifier() to check names. Also moved code closer together.
Currently checking for invalid class and attribute names happens in at least two different places and makes no use of any good logic. See if there's an easy regex or similar to sort out illegal names (starting with digit or special character) as well as discarding any attributes and class names that double with Python internal reserved words.