From 6645c550ef99d5cb1f0e75bf12dd320072feb5a7 Mon Sep 17 00:00:00 2001 From: Rasmus Wriedt Larsen Date: Thu, 24 Sep 2020 15:36:00 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Marco Gario --- python-setup/extractor_version.py | 3 +-- python-setup/install_tools.sh | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/python-setup/extractor_version.py b/python-setup/extractor_version.py index 0465c32ae..63e1c4211 100755 --- a/python-setup/extractor_version.py +++ b/python-setup/extractor_version.py @@ -30,7 +30,6 @@ def suppress_stdout_stderr(): def get_extractor_version(codeql_base_dir: str, quiet: bool = True) -> int: - extractor_dir = os.path.join(codeql_base_dir, 'python', 'tools') sys.path = [extractor_dir] + sys.path @@ -50,4 +49,4 @@ def get_extractor_version(codeql_base_dir: str, quiet: bool = True) -> int: if __name__ == "__main__": codeql_base_dir = sys.argv[1] version = get_extractor_version(codeql_base_dir) - print('{!r}'.format(version)) \ No newline at end of file + print('{!r}'.format(version)) diff --git a/python-setup/install_tools.sh b/python-setup/install_tools.sh index 8d6ac75d8..5179a5c24 100755 --- a/python-setup/install_tools.sh +++ b/python-setup/install_tools.sh @@ -21,7 +21,7 @@ python3 -m pip install --user virtualenv # venv is required for installation of poetry or pipenv (I forgot which) sudo apt-get install -y python3-venv -# We're install poetry with pip instead of the recommended way, since the recommended way +# We install poetry with pip instead of the recommended way, since the recommended way # caused some problem since `poetry run` gives output like: # # /root/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads.