Skip to content

[cffi] Fix _CDataBase.__enter__ annotated to return Self#15701

Merged
srittau merged 1 commit intopython:mainfrom
pacman82:main
May 5, 2026
Merged

[cffi] Fix _CDataBase.__enter__ annotated to return Self#15701
srittau merged 1 commit intopython:mainfrom
pacman82:main

Conversation

@pacman82
Copy link
Copy Markdown
Contributor

@pacman82 pacman82 commented May 5, 2026

Without this

with ffi.new("struct MyType *") as my_instance:
   ...

does not typecheck and causes: 'Type of "my_instance" is unknown'.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Copy Markdown
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@srittau srittau merged commit f1176df into python:main May 5, 2026
38 of 39 checks passed
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