Skip to content

Modified the type hinting for the attachment in the add_attachment fu… #1521

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rpop0
Copy link

@rpop0 rpop0 commented Oct 21, 2022

…nction to properly support BytesIo and StringIO

This change was done due to the fact that using an object of type BytesIO or StringIO resulted in IDE warnings regarding mismatched types.

@studioj
Copy link
Collaborator

studioj commented Nov 12, 2022

CI fails here
jira/client.py:1001: error: Incompatible types in assignment (expression has type "Union[BufferedReader, BytesIO, StringIO]", variable has type "BufferedReader") [assignment]
please fix
https://github.com/pycontribs/jira/actions/runs/3298630896/jobs/5759093003#step:8:75

@studioj
Copy link
Collaborator

studioj commented Feb 9, 2023

@rpop0 there were a lot of fixes to docstrings and types merged in another PR. Could you check if yours is still an issue?

@rpop0
Copy link
Author

rpop0 commented Sep 6, 2023

@studioj Sorry for the late response but the incorrect type hinting still seems to be an issue in the latest version. I'll update this when I get the time.

@cperrin88
Copy link

Wouldn't it be enough to just change the type to BufferedIOBase?

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

Successfully merging this pull request may close these issues.

3 participants