1
0
mirror of https://github.com/django/django.git synced 2025-10-25 14:46:09 +00:00

- flake8 & black fixes

This commit is contained in:
Jonathan
2023-05-11 12:28:52 +01:00
parent a5bec48ab4
commit 1be3ecf90a
2 changed files with 7 additions and 6 deletions

View File

@@ -118,7 +118,8 @@ class ModelBase(type):
else:
new_attrs[obj_name] = obj
new_class = super_new(cls, name, bases, new_attrs, **kwargs)
# update contributable_attrs with any such attributes added to new_class - these came from __init_subclass__
# update contributable_attrs with any such attributes added to new_class.
# any such attributes came from user-defined __init_subclass__ on new_class
for obj_name, obj in dict(vars(new_class)).items():
if _has_contribute_to_class(obj):
contributable_attrs[obj_name] = obj