mirror of https://github.com/apache/druid.git
Fix alerts from LGTM about python files (#8383)
This commit is contained in:
parent
1fe4ecf17a
commit
bba391a48c
|
@ -16,7 +16,6 @@
|
|||
# limitations under the License.
|
||||
|
||||
import yaml
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
from html.parser import HTMLParser
|
||||
|
|
|
@ -20,7 +20,6 @@ import re
|
|||
import requests
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
|
||||
def extract_pr_title_from_commit_message(commit_msg):
|
||||
|
@ -48,7 +47,7 @@ def extract_pr_title(pr_json):
|
|||
def find_missing_backports(pr_jsons, release_pr_subjects):
|
||||
for pr in pr_jsons:
|
||||
if pr['milestone'] is not None:
|
||||
if pr['milestone']['number'] is milestone_number:
|
||||
if pr['milestone']['number'] == milestone_number:
|
||||
for pr_title_candidate in extract_pr_title(pr):
|
||||
if pr_title_candidate in release_pr_subjects:
|
||||
return
|
||||
|
@ -65,8 +64,7 @@ def find_next_url(links):
|
|||
else:
|
||||
url_holder = match_result.group(0)
|
||||
return url_holder[1:-1]
|
||||
else:
|
||||
return None
|
||||
return None
|
||||
|
||||
|
||||
if len(sys.argv) != 5:
|
||||
|
|
|
@ -18,11 +18,8 @@
|
|||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import argparse
|
||||
import concurrent.futures
|
||||
import time
|
||||
import threading
|
||||
|
||||
|
||||
def generate_report(module_path, report_orig_path, report_out_path):
|
||||
|
@ -48,7 +45,7 @@ def generate_report(module_path, report_orig_path, report_out_path):
|
|||
def generate_reports(druid_path, tmp_path, exclude_ext, num_threads):
|
||||
tmp_path = os.path.abspath(tmp_path)
|
||||
license_report_root = os.path.join(tmp_path, "license-reports")
|
||||
license_core_path = os.path.join(license_report_root, "core")
|
||||
license_core_path = os.path.join(license_report_root, "core")
|
||||
license_ext_path = os.path.join(license_report_root, "ext")
|
||||
shutil.rmtree(license_report_root, ignore_errors=True)
|
||||
os.makedirs(license_core_path)
|
||||
|
|
|
@ -34,14 +34,14 @@ def main():
|
|||
tmp_lib_path = tmp_path + "/1-lib"
|
||||
os.mkdir(tmp_lib_path)
|
||||
command = "cp -r {}/* {}".format(lib_path, tmp_lib_path)
|
||||
outstr = subprocess.check_output(command, shell=True).decode('UTF-8')
|
||||
subprocess.check_output(command, shell=True).decode('UTF-8')
|
||||
|
||||
# copy hadoop deps to the staging dir
|
||||
hdeps_path = druid_path + "/hadoop-dependencies"
|
||||
tmp_hdeps_path = tmp_path + "/2-hdeps"
|
||||
os.mkdir(tmp_hdeps_path)
|
||||
command = "cp -r {}/* {}".format(hdeps_path, tmp_hdeps_path)
|
||||
outstr = subprocess.check_output(command, shell=True).decode('UTF-8')
|
||||
subprocess.check_output(command, shell=True).decode('UTF-8')
|
||||
|
||||
|
||||
# copy all extension folders to the staging dir
|
||||
|
@ -49,7 +49,7 @@ def main():
|
|||
tmp_ext_path = tmp_path + "/3-ext"
|
||||
os.mkdir(tmp_ext_path)
|
||||
command = "cp -r {}/* {}".format(ext_path, tmp_ext_path)
|
||||
outstr = subprocess.check_output(command, shell=True).decode('UTF-8')
|
||||
subprocess.check_output(command, shell=True).decode('UTF-8')
|
||||
|
||||
|
||||
get_notices(tmp_path)
|
||||
|
|
Loading…
Reference in New Issue