@@ -170,6 +170,7 @@ def move_project(
170
170
171
171
now = datetime .utcnow ()
172
172
affected = set ()
173
+ p : Project
173
174
for p in filter (None , (old_parent , new_parent )):
174
175
p .update (last_update = now )
175
176
affected .update ({p .id , * (p .path or [])})
@@ -184,6 +185,7 @@ def update(cls, company: str, project_id: str, **fields):
184
185
185
186
new_name = fields .pop ("name" , None )
186
187
if new_name :
188
+ # noinspection PyTypeChecker
187
189
new_name , new_location = _validate_project_name (new_name )
188
190
old_name , old_location = _validate_project_name (project .name )
189
191
if new_location != old_location :
@@ -823,7 +825,7 @@ def sum_status_count(
823
825
}
824
826
825
827
def sum_runtime (
826
- a : Mapping [str , Mapping ], b : Mapping [str , Mapping ]
828
+ a : Mapping [str , dict ], b : Mapping [str , dict ]
827
829
) -> Dict [str , dict ]:
828
830
return {
829
831
section : a .get (section , 0 ) + b .get (section , 0 )
@@ -1059,7 +1061,7 @@ def get_task_parents(
1059
1061
if not parent_ids :
1060
1062
return []
1061
1063
1062
- parents = Task .get_many_with_join (
1064
+ parents : Sequence [ dict ] = Task .get_many_with_join (
1063
1065
company_id ,
1064
1066
query = Q (id__in = parent_ids ),
1065
1067
query_dict = {"name" : name } if name else None ,
@@ -1166,7 +1168,7 @@ def get_match_conditions(
1166
1168
1167
1169
if or_conditions :
1168
1170
if len (or_conditions ) == 1 :
1169
- conditions = next (iter (or_conditions ))
1171
+ conditions . update ( next (iter (or_conditions ) ))
1170
1172
else :
1171
1173
conditions ["$and" ] = [c for c in or_conditions ]
1172
1174
0 commit comments