Skip to content

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Oct 3, 2025

Some type annotations are using nested types of the TestSuiteDB class. However, these nested types are actually defined in the init method of TestSuiteDB and are hence not accessible as a class member. The easiest fix seems to be to downgrade these type annotations back to comments, at least for now.

In a few other places, add missing annotations to make mypy happy and add # noqa to work around flake8 flagging imports as unused (when in reality they are required for mypy annotations).

Finally, make the mypy test non-optional so it shows up as a failure when we break it. We are clearly missing a lot of annotations, but at least we have a basis that we can build upon and avoid regressing.

Some type annotations are using nested types of the TestSuiteDB
class. However, these nested types are actually defined in the
__init__ method of TestSuiteDB and are hence not accessible as a
class member. The easiest fix seems to be to downgrade these type
annotations back to comments, at least for now.

In a few other places, add missing annotations to make mypy happy
and add `# noqa` to work around flake8 flagging imports as unused
(when in reality they are required for mypy annotations).

Finally, make the mypy test non-optional so it shows up as a failure
when we break it. We are clearly missing a lot of annotations, but
at least we have a basis that we can build upon and avoid regressing.
@ldionne
Copy link
Member Author

ldionne commented Oct 3, 2025

Verified locally that this fixes otherwise critically broken functionality and it makes the CI a bit "more green", so I'm merging.

@ldionne ldionne merged commit 7485824 into llvm:main Oct 3, 2025
1 of 2 checks passed
@ldionne ldionne deleted the review/add-typevars branch October 3, 2025 20:32
@DavidSpickett
Copy link
Contributor

Thanks for fixing this. Bots are fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants