Call super in Generic.__init_subclass__ (GH-6356)

(cherry picked from commit ee566fe526)

Co-authored-by: Ivan Levkivskyi <levkivskyi@gmail.com>
This commit is contained in:
Miss Islington (bot) 2018-04-04 09:51:34 -07:00 committed by GitHub
parent 785f36c876
commit bd85c97382
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View file

@ -850,6 +850,7 @@ class Generic:
return _GenericAlias(cls, params)
def __init_subclass__(cls, *args, **kwargs):
super().__init_subclass__(*args, **kwargs)
tvars = []
if '__orig_bases__' in cls.__dict__:
error = Generic in cls.__orig_bases__