facebook / facebook/pyrefly

new rule - ban unsafe multiple inheritance

Open
#3,726 5 comments 1 reaction 0 assignees View on GitHub
help wanted typechecking
Dominant language
Rust
Stars
7k
Forks
516
PR merge metrics
No merged PRs in 30d

Description

basedpyright's [`reportUnsafeMultipleInheritance`](https://docs.basedpyright.com/latest/benefits-over-pyright/new-diagnostic-rules/#reportunsafemultipleinheritance) reports an error when inheriting from multiple classes with `__init__` or `__new__` methods, because it's impossible to statically verify on the definition of each base class that all of the constructors will be called, and with their correct arguments.

it would be nice if pyrefly had a rule for this too.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.