Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to fix daemon crash related to ABCs #16275

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion mypy/semanal_classprop.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def calculate_class_abstract_status(typ: TypeInfo, is_stub_file: bool, errors: E
abstract attribute. Also compute a list of abstract attributes.
Report error is required ABCMeta metaclass is missing.
"""
typ.is_abstract = False
typ.abstract_attributes = []
if typ.typeddict_type:
return # TypedDict can't be abstract
concrete: set[str] = set()
Expand All @@ -56,7 +58,6 @@ def calculate_class_abstract_status(typ: TypeInfo, is_stub_file: bool, errors: E
# Special case: NewTypes are considered as always non-abstract, so they can be used as:
# Config = NewType('Config', Mapping[str, str])
# default = Config({'cannot': 'modify'}) # OK
typ.abstract_attributes = []
return
for base in typ.mro:
for name, symnode in base.names.items():
Expand Down