Skip to content

Complete stubtest for aiofiles + fix on Windows #9184

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

Merged
merged 4 commits into from
Nov 13, 2022

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Nov 13, 2022

Set ignore_missing_stub = false, added a missing method and property, and fixed stubtest runs on Windows.

I did not add darwin to platforms because it would be redundant with linux. But I still added a stubtest_allowlist_darwin.txt for those who would like to run it locally on macos. (This is the edge case mentioned in #9173 )

@github-actions

This comment has been minimized.

@@ -17,6 +17,7 @@ _T = TypeVar("_T")
class AsyncSpooledTemporaryFile(AsyncBase[_T]):
def fileno(self) -> Generator[Incomplete, Incomplete, Incomplete]: ...
def rollover(self) -> Generator[Incomplete, Incomplete, Incomplete]: ...
async def close(self, *args: Incomplete, **kwargs: Incomplete) -> None: ...
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
async def close(self, *args: Incomplete, **kwargs: Incomplete) -> None: ...
async def close(self) -> None: ...

This gets delegated to the underlying file's close() method.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks, I wasn't sure of the exact signature. I'll add an allowlist entry.

@Avasam Avasam requested a review from JelleZijlstra November 13, 2022 08:08
@github-actions
Copy link
Contributor

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

@JelleZijlstra JelleZijlstra merged commit 033d21e into python:main Nov 13, 2022
@Avasam Avasam deleted the stubtest-aiofiles branch November 13, 2022 16:44
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