Skip to content

Commit

Permalink
Flake 8 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
HardNorth committed Nov 13, 2023
1 parent 6595a19 commit 6561c1b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions app/service/auto_analyzer_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ def build_analyze_query(self, launch, log, size=10):
for field, boost_score in [
("detected_message_without_params_extended", 2.0),
("only_numbers", 2.0), ("potential_status_codes", 8.0),
("found_tests_and_methods", 2), ("test_item_name", 2.0)]:
("found_tests_and_methods", 2), ("test_item_name", 2.0)
]:
if log["_source"][field].strip():
query["query"]["bool"]["should"].append(
self.build_more_like_this_query("1",
Expand Down Expand Up @@ -332,7 +333,8 @@ def _query_elasticsearch(self, launches, max_batch_size=30):
continue
for query_type, query in [
("without no defect", self.build_analyze_query(launch, log)),
("with no defect", self.build_query_with_no_defect(launch, log))]:
("with no defect", self.build_query_with_no_defect(launch, log))
]:
full_query = "{}\n{}".format(
json.dumps({"index": index_name}), json.dumps(query))
batches.append(full_query)
Expand Down Expand Up @@ -457,8 +459,8 @@ def analyze_logs(self, launches):
features_dict_with_saved_objects=features_dict_objects)
boosting_data_gatherer.set_defect_type_model(defect_type_model_to_use[project_id])
feature_data, issue_type_names = boosting_data_gatherer.gather_features_info()
model_info_tags = boosting_data_gatherer.get_used_model_info() + \
_boosting_decision_maker.get_model_info()
model_info_tags = (boosting_data_gatherer.get_used_model_info() +
_boosting_decision_maker.get_model_info())
results_to_share[launch_id]["model_info"].update(model_info_tags)

if len(feature_data) > 0:
Expand Down

0 comments on commit 6561c1b

Please sign in to comment.