@@ -209,7 +209,7 @@ def __getstate__(self) -> dict[str, Any]:
209
209
"""Pickling the resource."""
210
210
return vars (self )
211
211
212
- def __setstate__ (self , raw_pickled : dict [str , Any ]):
212
+ def __setstate__ (self , raw_pickled : dict [str , Any ]) -> None :
213
213
"""Unpickling of the resource."""
214
214
# https://stackoverflow.com/a/50888571/7724187
215
215
vars (self ).update (raw_pickled )
@@ -247,7 +247,7 @@ def find(
247
247
self ,
248
248
id : tuple [str , ...] | int | str ,
249
249
params : dict [str , str ] | None = None ,
250
- ):
250
+ ) -> None :
251
251
"""Finds a resource based on the input parameters.
252
252
253
253
Args:
@@ -268,7 +268,7 @@ def _find_by_url(
268
268
self ,
269
269
url : str ,
270
270
params : dict [str , str ] | None = None ,
271
- ):
271
+ ) -> None :
272
272
"""Finds a resource on the specified url.
273
273
274
274
The resource is loaded with the JSON data returned by doing a
@@ -318,7 +318,7 @@ def update(
318
318
jira : JIRA | None = None ,
319
319
notify : bool = True ,
320
320
** kwargs : Any ,
321
- ):
321
+ ) -> None :
322
322
"""Update this resource on the server.
323
323
324
324
Keyword arguments are marshalled into a dict before being sent. If this resource doesn't support ``PUT``, a :py:exc:`.JIRAError`
@@ -458,7 +458,7 @@ def _load(
458
458
headers = CaseInsensitiveDict (),
459
459
params : dict [str , str ] | None = None ,
460
460
path : str | None = None ,
461
- ):
461
+ ) -> None :
462
462
"""Load a resource.
463
463
464
464
Args:
@@ -480,7 +480,7 @@ def _load(
480
480
j = j [path ]
481
481
self ._parse_raw (j )
482
482
483
- def _parse_raw (self , raw : dict [str , Any ]):
483
+ def _parse_raw (self , raw : dict [str , Any ]) -> None :
484
484
"""Parse a raw dictionary to create a resource.
485
485
486
486
Args:
@@ -513,7 +513,7 @@ def __init__(
513
513
self ._parse_raw (raw )
514
514
self .raw : dict [str , Any ] = cast (dict [str , Any ], self .raw )
515
515
516
- def get (self ):
516
+ def get (self ) -> bytes | None :
517
517
"""Return the file content as a string."""
518
518
r = self ._session .get (self .content , headers = {"Accept" : "*/*" })
519
519
return r .content
@@ -538,7 +538,7 @@ def __init__(
538
538
self ._parse_raw (raw )
539
539
self .raw : dict [str , Any ] = cast (dict [str , Any ], self .raw )
540
540
541
- def delete (self , moveIssuesTo : str | None = None ): # type: ignore[override]
541
+ def delete (self , moveIssuesTo : str | None = None ) -> None : # type: ignore[override]
542
542
"""Delete this component from the server.
543
543
544
544
Args:
@@ -775,7 +775,7 @@ class _Worklog:
775
775
def __init__ (self ) -> None :
776
776
self .worklogs : list [Worklog ] = []
777
777
778
- def __init__ (self ):
778
+ def __init__ (self ) -> None :
779
779
self .assignee : UnknownResource | None = None
780
780
self .attachment : list [Attachment ] = []
781
781
self .comment = self ._Comment ()
@@ -822,7 +822,7 @@ def update( # type: ignore[override] # incompatible supertype ignored
822
822
jira : JIRA | None = None ,
823
823
notify : bool = True ,
824
824
** fieldargs ,
825
- ):
825
+ ) -> None :
826
826
"""Update this issue on the server.
827
827
828
828
Each keyword argument (other than the predefined ones) is treated as a field name and the argument's value is treated as
@@ -893,7 +893,7 @@ def get_field(self, field_name: str) -> Any:
893
893
else :
894
894
return getattr (self .fields , field_name )
895
895
896
- def add_field_value (self , field : str , value : str ):
896
+ def add_field_value (self , field : str , value : str ) -> None :
897
897
"""Add a value to a field that supports multiple values, without resetting the existing values.
898
898
899
899
This should work with: labels, multiple checkbox lists, multiple select
@@ -904,15 +904,15 @@ def add_field_value(self, field: str, value: str):
904
904
"""
905
905
super ().update (fields = {"update" : {field : [{"add" : value }]}})
906
906
907
- def delete (self , deleteSubtasks = False ):
907
+ def delete (self , deleteSubtasks = False ) -> None :
908
908
"""Delete this issue from the server.
909
909
910
910
Args:
911
911
deleteSubtasks (bool): True to also delete subtasks. If any are present the Issue won't be deleted (Default: ``False``)
912
912
"""
913
913
super ().delete (params = {"deleteSubtasks" : deleteSubtasks })
914
914
915
- def permalink (self ):
915
+ def permalink (self ) -> str :
916
916
"""Get the URL of the issue, the browsable one not the REST one.
917
917
918
918
Returns:
@@ -947,7 +947,7 @@ def update( # type: ignore[override]
947
947
visibility : dict [str , str ] | None = None ,
948
948
is_internal : bool = False ,
949
949
notify : bool = True ,
950
- ):
950
+ ) -> None :
951
951
"""Update a comment.
952
952
953
953
Keyword arguments are marshalled into a dict before being sent.
@@ -1012,7 +1012,7 @@ def update( # type: ignore[override]
1012
1012
globalId = None ,
1013
1013
application = None ,
1014
1014
relationship = None ,
1015
- ):
1015
+ ) -> None :
1016
1016
"""Update a RemoteLink. 'object' is required.
1017
1017
1018
1018
For definitions of the allowable fields for 'object' and the keyword arguments 'globalId', 'application' and 'relationship',
@@ -1170,7 +1170,7 @@ def __init__(
1170
1170
1171
1171
def delete ( # type: ignore[override]
1172
1172
self , adjustEstimate : str | None = None , newEstimate = None , increaseBy = None
1173
- ):
1173
+ ) -> None :
1174
1174
"""Delete this worklog entry from its associated issue.
1175
1175
1176
1176
Args:
@@ -1209,7 +1209,7 @@ def _find_by_url(
1209
1209
self ,
1210
1210
url : str ,
1211
1211
params : dict [str , str ] | None = None ,
1212
- ):
1212
+ ) -> None :
1213
1213
super ()._find_by_url (url , params )
1214
1214
# An IssueProperty never returns "self" identifier, set it
1215
1215
self .self = url
@@ -1308,7 +1308,7 @@ def update( # type: ignore[override]
1308
1308
self ,
1309
1309
users : str | list | tuple | None = None ,
1310
1310
groups : str | list | tuple | None = None ,
1311
- ):
1311
+ ) -> None :
1312
1312
"""Add the specified users or groups to this project role. One of ``users`` or ``groups`` must be specified.
1313
1313
1314
1314
Args:
@@ -1334,7 +1334,7 @@ def add_user(
1334
1334
self ,
1335
1335
users : str | list | tuple | None = None ,
1336
1336
groups : str | list | tuple | None = None ,
1337
- ):
1337
+ ) -> None :
1338
1338
"""Add the specified users or groups to this project role. One of ``users`` or ``groups`` must be specified.
1339
1339
1340
1340
Args:
0 commit comments