From 47615badcf1dddf68bbb84803e08295d0ab12813 Mon Sep 17 00:00:00 2001 From: Schuyler Martin Date: Fri, 31 Oct 2025 15:12:45 -0600 Subject: [PATCH] chore: Adds some missing type annotations Adds a few missing type annotations I found while working on another project. `mypy` flagged most of these with `no-untyped-call`. The others I found while updating the functions flagged by `mypy`. --- jira/client.py | 4 ++-- jira/resources.py | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/jira/client.py b/jira/client.py index b23aff2de..99bb629ef 100644 --- a/jira/client.py +++ b/jira/client.py @@ -732,11 +732,11 @@ def _check_update_(self): except Exception as e: self.log.warning(e) - def __del__(self): + def __del__(self) -> None: """Destructor for JIRA instance.""" self.close() - def close(self): + def close(self) -> None: session = getattr(self, "_session", None) if session is not None: try: diff --git a/jira/resources.py b/jira/resources.py index 7127e2402..0ad52e590 100644 --- a/jira/resources.py +++ b/jira/resources.py @@ -893,7 +893,7 @@ def get_field(self, field_name: str) -> Any: else: return getattr(self.fields, field_name) - def add_field_value(self, field: str, value: str): + def add_field_value(self, field: str, value: str) -> None: """Add a value to a field that supports multiple values, without resetting the existing values. This should work with: labels, multiple checkbox lists, multiple select @@ -904,7 +904,7 @@ def add_field_value(self, field: str, value: str): """ super().update(fields={"update": {field: [{"add": value}]}}) - def delete(self, deleteSubtasks=False): + def delete(self, deleteSubtasks=False) -> None: """Delete this issue from the server. Args: @@ -912,7 +912,7 @@ def delete(self, deleteSubtasks=False): """ super().delete(params={"deleteSubtasks": deleteSubtasks}) - def permalink(self): + def permalink(self) -> str: """Get the URL of the issue, the browsable one not the REST one. Returns: