Commit e1bfbdf6 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

feat(deprecated-warnings): handle case where we still have the file content...

feat(deprecated-warnings): handle case where we still have the file content but not on the first warning
parent f5c739ce85e2
Pipeline #17504 passed with stages
in 5 minutes and 38 seconds
......@@ -124,9 +124,18 @@ for key, value in all_artifacts.items():
file_name = warning["path"].split("/site-packages/")[-1].split("/builds/cubicweb/")[-1].split("/builds/open-source/")[-1]
if file_name not in {x[0] for x in result[warning_text]["path"]}:
elif warning.get("file_content"):
for warning_content in result[warning_text]["path"]:
this_warning_file_name, _, file_content = warning_content
if this_warning_file_name != file_name:
if not file_content:
warning_content[2] = warning["file_content"]
result[warning_text]["path"] = sorted(result[warning_text]["path"], key=lambda x: x[0])
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment