@@ -34,18 +34,18 @@ class DatabaseSummaryReport:
3434 def from_response_dict (cls , response_dict : dict [str , Any ]) -> Self :
3535 """Construct from a VWS API response dict."""
3636 return cls (
37- active_images = int (response_dict ["active_images" ]), # type: ignore[arg-type]
38- current_month_recos = int (response_dict ["current_month_recos" ]), # type: ignore[arg-type]
39- failed_images = int (response_dict ["failed_images" ]), # type: ignore[arg-type]
40- inactive_images = int (response_dict ["inactive_images" ]), # type: ignore[arg-type]
41- name = response_dict ["name" ], # type: ignore[arg-type]
42- previous_month_recos = int (response_dict ["previous_month_recos" ]), # type: ignore[arg-type]
43- processing_images = int (response_dict ["processing_images" ]), # type: ignore[arg-type]
44- reco_threshold = int (response_dict ["reco_threshold" ]), # type: ignore[arg-type]
45- request_quota = int (response_dict ["request_quota" ]), # type: ignore[arg-type]
46- request_usage = int (response_dict ["request_usage" ]), # type: ignore[arg-type]
47- target_quota = int (response_dict ["target_quota" ]), # type: ignore[arg-type]
48- total_recos = int (response_dict ["total_recos" ]), # type: ignore[arg-type]
37+ active_images = int (response_dict ["active_images" ]),
38+ current_month_recos = int (response_dict ["current_month_recos" ]),
39+ failed_images = int (response_dict ["failed_images" ]),
40+ inactive_images = int (response_dict ["inactive_images" ]),
41+ name = response_dict ["name" ],
42+ previous_month_recos = int (response_dict ["previous_month_recos" ]),
43+ processing_images = int (response_dict ["processing_images" ]),
44+ reco_threshold = int (response_dict ["reco_threshold" ]),
45+ request_quota = int (response_dict ["request_quota" ]),
46+ request_usage = int (response_dict ["request_usage" ]),
47+ target_quota = int (response_dict ["target_quota" ]),
48+ total_recos = int (response_dict ["total_recos" ]),
4949 )
5050
5151
@@ -83,20 +83,20 @@ class TargetSummaryReport:
8383 previous_month_recos : int
8484
8585 @classmethod
86- def from_response_dict (cls , response_dict : dict [str , Any ]) -> Self : # type: ignore[name-defined]
86+ def from_response_dict (cls , response_dict : dict [str , Any ]) -> Self :
8787 """Construct from a VWS API response dict."""
88- return cls ( # type: ignore[arg-type]
89- status = TargetStatuses (value = response_dict ["status" ]), # type: ignore[arg-type]
90- database_name = response_dict ["database_name" ], # type: ignore[arg-type]
91- target_name = response_dict ["target_name" ], # type: ignore[arg-type]
88+ return cls (
89+ status = TargetStatuses (value = response_dict ["status" ]),
90+ database_name = response_dict ["database_name" ],
91+ target_name = response_dict ["target_name" ],
9292 upload_date = datetime .date .fromisoformat (
9393 response_dict ["upload_date" ]
94- ), # type: ignore[arg-type]
95- active_flag = bool (response_dict ["active_flag" ]), # type: ignore[arg-type]
96- tracking_rating = int (response_dict ["tracking_rating" ]), # type: ignore[arg-type]
97- total_recos = int (response_dict ["total_recos" ]), # type: ignore[arg-type]
98- current_month_recos = int (response_dict ["current_month_recos" ]), # type: ignore[arg-type]
99- previous_month_recos = int (response_dict ["previous_month_recos" ]), # type: ignore[arg-type]
94+ ),
95+ active_flag = bool (response_dict ["active_flag" ]),
96+ tracking_rating = int (response_dict ["tracking_rating" ]),
97+ total_recos = int (response_dict ["total_recos" ]),
98+ current_month_recos = int (response_dict ["current_month_recos" ]),
99+ previous_month_recos = int (response_dict ["previous_month_recos" ]),
100100 )
101101
102102
@@ -140,22 +140,22 @@ class QueryResult:
140140 target_data : TargetData | None
141141
142142 @classmethod
143- def from_response_dict (cls , response_dict : dict [str , Any ]) -> Self : # type: ignore[name-defined]
143+ def from_response_dict (cls , response_dict : dict [str , Any ]) -> Self :
144144 """Construct from a VWS API query result item dict."""
145145 target_data : TargetData | None = None
146146 if "target_data" in response_dict :
147147 target_data_dict = response_dict ["target_data" ]
148148 target_timestamp = datetime .datetime .fromtimestamp (
149- timestamp = target_data_dict ["target_timestamp" ], # type: ignore[arg-type]
149+ timestamp = target_data_dict ["target_timestamp" ],
150150 tz = datetime .UTC ,
151151 )
152152 target_data = TargetData (
153- name = target_data_dict ["name" ], # type: ignore[arg-type]
154- application_metadata = target_data_dict ["application_metadata" ], # type: ignore[arg-type]
153+ name = target_data_dict ["name" ],
154+ application_metadata = target_data_dict ["application_metadata" ],
155155 target_timestamp = target_timestamp ,
156156 )
157- return cls ( # type: ignore[arg-type]
158- target_id = response_dict ["target_id" ], # type: ignore[arg-type]
157+ return cls (
158+ target_id = response_dict ["target_id" ],
159159 target_data = target_data ,
160160 )
161161
@@ -173,16 +173,16 @@ class TargetStatusAndRecord:
173173 target_record : TargetRecord
174174
175175 @classmethod
176- def from_response_dict (cls , response_dict : dict [str , Any ]) -> Self : # type: ignore[name-defined]
176+ def from_response_dict (cls , response_dict : dict [str , Any ]) -> Self :
177177 """Construct from a VWS API response dict."""
178- status = TargetStatuses (value = response_dict ["status" ]) # type: ignore[arg-type]
178+ status = TargetStatuses (value = response_dict ["status" ])
179179 target_record_dict = dict (response_dict ["target_record" ])
180180 target_record = TargetRecord (
181- target_id = target_record_dict ["target_id" ], # type: ignore[arg-type]
182- active_flag = bool (target_record_dict ["active_flag" ]), # type: ignore[arg-type]
183- name = target_record_dict ["name" ], # type: ignore[arg-type]
184- width = float (target_record_dict ["width" ]), # type: ignore[arg-type]
185- tracking_rating = int (target_record_dict ["tracking_rating" ]), # type: ignore[arg-type]
186- reco_rating = target_record_dict ["reco_rating" ], # type: ignore[arg-type]
181+ target_id = target_record_dict ["target_id" ],
182+ active_flag = bool (target_record_dict ["active_flag" ]),
183+ name = target_record_dict ["name" ],
184+ width = float (target_record_dict ["width" ]),
185+ tracking_rating = int (target_record_dict ["tracking_rating" ]),
186+ reco_rating = target_record_dict ["reco_rating" ],
187187 )
188- return cls (status = status , target_record = target_record ) # type: ignore[arg-type]
188+ return cls (status = status , target_record = target_record )
0 commit comments