@@ -208,7 +208,7 @@ def __getstate__(self) -> dict[str, Any]:
208
208
"""Pickling the resource."""
209
209
return vars (self )
210
210
211
- def __setstate__ (self , raw_pickled : dict [str , Any ]):
211
+ def __setstate__ (self , raw_pickled : dict [str , Any ]) -> None :
212
212
"""Unpickling of the resource."""
213
213
# https://stackoverflow.com/a/50888571/7724187
214
214
vars (self ).update (raw_pickled )
@@ -246,7 +246,7 @@ def find(
246
246
self ,
247
247
id : tuple [str , ...] | int | str ,
248
248
params : dict [str , str ] | None = None ,
249
- ):
249
+ ) -> None :
250
250
"""Finds a resource based on the input parameters.
251
251
252
252
Args:
@@ -267,7 +267,7 @@ def _find_by_url(
267
267
self ,
268
268
url : str ,
269
269
params : dict [str , str ] | None = None ,
270
- ):
270
+ ) -> None :
271
271
"""Finds a resource on the specified url.
272
272
273
273
The resource is loaded with the JSON data returned by doing a
@@ -299,7 +299,7 @@ def update(
299
299
jira : JIRA | None = None ,
300
300
notify : bool = True ,
301
301
** kwargs : Any ,
302
- ):
302
+ ) -> None :
303
303
"""Update this resource on the server.
304
304
305
305
Keyword arguments are marshalled into a dict before being sent. If this resource doesn't support ``PUT``, a :py:exc:`.JIRAError`
@@ -437,7 +437,7 @@ def _load(
437
437
headers = CaseInsensitiveDict (),
438
438
params : dict [str , str ] | None = None ,
439
439
path : str | None = None ,
440
- ):
440
+ ) -> None :
441
441
"""Load a resource.
442
442
443
443
Args:
@@ -459,7 +459,7 @@ def _load(
459
459
j = j [path ]
460
460
self ._parse_raw (j )
461
461
462
- def _parse_raw (self , raw : dict [str , Any ]):
462
+ def _parse_raw (self , raw : dict [str , Any ]) -> None :
463
463
"""Parse a raw dictionary to create a resource.
464
464
465
465
Args:
@@ -492,7 +492,7 @@ def __init__(
492
492
self ._parse_raw (raw )
493
493
self .raw : dict [str , Any ] = cast (dict [str , Any ], self .raw )
494
494
495
- def get (self ):
495
+ def get (self ) -> bytes | None :
496
496
"""Return the file content as a string."""
497
497
r = self ._session .get (self .content , headers = {"Accept" : "*/*" })
498
498
return r .content
@@ -517,7 +517,7 @@ def __init__(
517
517
self ._parse_raw (raw )
518
518
self .raw : dict [str , Any ] = cast (dict [str , Any ], self .raw )
519
519
520
- def delete (self , moveIssuesTo : str | None = None ): # type: ignore[override]
520
+ def delete (self , moveIssuesTo : str | None = None ) -> None : # type: ignore[override]
521
521
"""Delete this component from the server.
522
522
523
523
Args:
@@ -754,7 +754,7 @@ class _Worklog:
754
754
def __init__ (self ) -> None :
755
755
self .worklogs : list [Worklog ] = []
756
756
757
- def __init__ (self ):
757
+ def __init__ (self ) -> None :
758
758
self .assignee : UnknownResource | None = None
759
759
self .attachment : list [Attachment ] = []
760
760
self .comment = self ._Comment ()
@@ -801,7 +801,7 @@ def update( # type: ignore[override] # incompatible supertype ignored
801
801
jira : JIRA | None = None ,
802
802
notify : bool = True ,
803
803
** fieldargs ,
804
- ):
804
+ ) -> None :
805
805
"""Update this issue on the server.
806
806
807
807
Each keyword argument (other than the predefined ones) is treated as a field name and the argument's value is treated as
@@ -872,7 +872,7 @@ def get_field(self, field_name: str) -> Any:
872
872
else :
873
873
return getattr (self .fields , field_name )
874
874
875
- def add_field_value (self , field : str , value : str ):
875
+ def add_field_value (self , field : str , value : str ) -> None :
876
876
"""Add a value to a field that supports multiple values, without resetting the existing values.
877
877
878
878
This should work with: labels, multiple checkbox lists, multiple select
@@ -883,15 +883,15 @@ def add_field_value(self, field: str, value: str):
883
883
"""
884
884
super ().update (fields = {"update" : {field : [{"add" : value }]}})
885
885
886
- def delete (self , deleteSubtasks = False ):
886
+ def delete (self , deleteSubtasks = False ) -> None :
887
887
"""Delete this issue from the server.
888
888
889
889
Args:
890
890
deleteSubtasks (bool): True to also delete subtasks. If any are present the Issue won't be deleted (Default: ``True``)
891
891
"""
892
892
super ().delete (params = {"deleteSubtasks" : deleteSubtasks })
893
893
894
- def permalink (self ):
894
+ def permalink (self ) -> str :
895
895
"""Get the URL of the issue, the browsable one not the REST one.
896
896
897
897
Returns:
@@ -926,7 +926,7 @@ def update( # type: ignore[override]
926
926
visibility : dict [str , str ] | None = None ,
927
927
is_internal : bool = False ,
928
928
notify : bool = True ,
929
- ):
929
+ ) -> None :
930
930
"""Update a comment.
931
931
932
932
Keyword arguments are marshalled into a dict before being sent.
@@ -991,7 +991,7 @@ def update( # type: ignore[override]
991
991
globalId = None ,
992
992
application = None ,
993
993
relationship = None ,
994
- ):
994
+ ) -> None :
995
995
"""Update a RemoteLink. 'object' is required.
996
996
997
997
For definitions of the allowable fields for 'object' and the keyword arguments 'globalId', 'application' and 'relationship',
@@ -1149,7 +1149,7 @@ def __init__(
1149
1149
1150
1150
def delete ( # type: ignore[override]
1151
1151
self , adjustEstimate : str | None = None , newEstimate = None , increaseBy = None
1152
- ):
1152
+ ) -> None :
1153
1153
"""Delete this worklog entry from its associated issue.
1154
1154
1155
1155
Args:
@@ -1188,7 +1188,7 @@ def _find_by_url(
1188
1188
self ,
1189
1189
url : str ,
1190
1190
params : dict [str , str ] | None = None ,
1191
- ):
1191
+ ) -> None :
1192
1192
super ()._find_by_url (url , params )
1193
1193
# An IssueProperty never returns "self" identifier, set it
1194
1194
self .self = url
@@ -1287,7 +1287,7 @@ def update( # type: ignore[override]
1287
1287
self ,
1288
1288
users : str | list | tuple | None = None ,
1289
1289
groups : str | list | tuple | None = None ,
1290
- ):
1290
+ ) -> None :
1291
1291
"""Add the specified users or groups to this project role. One of ``users`` or ``groups`` must be specified.
1292
1292
1293
1293
Args:
@@ -1313,7 +1313,7 @@ def add_user(
1313
1313
self ,
1314
1314
users : str | list | tuple | None = None ,
1315
1315
groups : str | list | tuple | None = None ,
1316
- ):
1316
+ ) -> None :
1317
1317
"""Add the specified users or groups to this project role. One of ``users`` or ``groups`` must be specified.
1318
1318
1319
1319
Args:
0 commit comments