/pyright-dublicate-base-error

Demonstrates the duplicate base class error

Primary LanguagePython

How to reproduce

The bug does not manifest consistently, so good luck...

In order to have the right prerequisites for type checking to succeed, you need to:

  1. Run ./prepare-venv.sh so the right Python virtual environment is populated
  2. Either ./run-test.sh, or open the generated-code folder in VS Code with Pylance or PyRight extensions enabled (type checking set to basic)

Error information

The unexpected "Duplicate base class not allowed" error show up on this line:

The "first" base is declared on this line:

And the "second" base (which is different from the first one) is imported at:

Note

The bulk of this is generated code, which explains the odd naming... This is part of the test suite of aws/jsii's code generation tools.