Skip to content
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

disnake.File support for io.TextIOBase files #765

Open
Enegg opened this issue Sep 25, 2022 · 0 comments · May be fixed by #767
Open

disnake.File support for io.TextIOBase files #765

Enegg opened this issue Sep 25, 2022 · 0 comments · May be fixed by #767
Labels
feature request Request for a new feature

Comments

@Enegg
Copy link
Contributor

Enegg commented Sep 25, 2022

Summary

Add support for passing io.TextIOBase-d files as fp param to disnake.File.

What is the feature request for?

The core library

The Problem

At runtime aiohttp seems to handle io.TextIOBase files, so the support is sort of there.
However the parameter isn't typed as accepting them, resulting in the linter complaining.

The Ideal Solution

Allow passing io.TextIOBase directly as the fp param.

The Current Solution

# type: ignore when passing the "incompatible" type.

@Enegg Enegg added the feature request Request for a new feature label Sep 25, 2022
@Enegg Enegg linked a pull request Sep 26, 2022 that will close this issue
8 tasks
@onerandomusername onerandomusername moved this to Todo in disnake Oct 31, 2022
@onerandomusername onerandomusername added this to the disnake v2.8 milestone Oct 31, 2022
@shiftinv shiftinv removed this from the disnake v2.8 milestone Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

3 participants