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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions jira/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from collections import OrderedDict
from collections.abc import Iterable
from functools import lru_cache, wraps
from io import BufferedReader
from io import BufferedReader, BytesIO, StringIO
from numbers import Number
from typing import (
Any,
Expand Down Expand Up @@ -973,7 +973,10 @@ def attachment_meta(self) -> Dict[str, int]:

@translate_resource_args
def add_attachment(
self, issue: str, attachment: Union[str, BufferedReader], filename: str = None
self,
issue: str,
attachment: Union[str, BufferedReader, BytesIO, StringIO],
filename: str = None,
) -> Attachment:
"""Attach an attachment to an issue and returns a Resource for it.

Expand Down