Add missing ClassVar type annotations to arbitrarily nested Python class attributes with existing annotations.
Assuming class variables are defined in SCREAMING_SNAKE_CASE, this regex searches for class attributes which do not yet have a ClassVar annotation from the typing module.
This can be useful for adding missing class variables by replacing the group named 'annotation' with ClassVar[${annotation}]. I.e...
Submitted by jrbergen - 3 years ago