summaryrefslogtreecommitdiff
path: root/buildscripts/linter
diff options
context:
space:
mode:
authorMathew Robinson <chasinglogic@gmail.com>2019-04-12 11:02:46 -0400
committerMathew Robinson <chasinglogic@gmail.com>2019-04-12 11:02:46 -0400
commitc6560dd65c6a2eac9f83045e6197d7dbce512c6e (patch)
treef4d8e7be4ccf0fe16d7bc73f30eb84ce4e0d5c37 /buildscripts/linter
parent3b94354b60bb9f3be1a73998f72b933dbab6a217 (diff)
downloadmongo-c6560dd65c6a2eac9f83045e6197d7dbce512c6e.tar.gz
SERVER-40549 Remove ignore_interpreter
Diffstat (limited to 'buildscripts/linter')
-rw-r--r--buildscripts/linter/base.py11
-rw-r--r--buildscripts/linter/mypy.py11
-rw-r--r--buildscripts/linter/runner.py12
3 files changed, 1 insertions, 33 deletions
diff --git a/buildscripts/linter/base.py b/buildscripts/linter/base.py
index bb22ea7cf80..863cbfbc8e9 100644
--- a/buildscripts/linter/base.py
+++ b/buildscripts/linter/base.py
@@ -50,17 +50,6 @@ class LinterBase(object, metaclass=ABCMeta):
"""
return False
- def ignore_interpreter(self):
- # type: () -> bool
- # pylint: disable=no-self-use
- """
- Check if we should ignore the interpreter when searching for the linter to run.
-
- This applies to mypy specifically since the pylinters are executed under Python 2 but mypy
- is executed by python 3.
- """
- return False
-
class LinterInstance(object):
"""A pair of a Linter and the full path of the linter cmd to run."""
diff --git a/buildscripts/linter/mypy.py b/buildscripts/linter/mypy.py
index 1189093dd2c..cb6205e5e10 100644
--- a/buildscripts/linter/mypy.py
+++ b/buildscripts/linter/mypy.py
@@ -30,14 +30,3 @@ class MypyLinter(base.LinterBase):
if 'idl' in file_name or 'linter' in file_name:
return [file_name]
return []
-
- def ignore_interpreter(self):
- # type: () -> bool
- # pylint: disable=no-self-use
- """
- Check if we should ignore the interpreter when searching for the linter to run.
-
- This applies to mypy specifically since the pylinters are executed under Python 2 but mypy
- is executed by python 3.
- """
- return True
diff --git a/buildscripts/linter/runner.py b/buildscripts/linter/runner.py
index de8ae2a5852..8a3951d9635 100644
--- a/buildscripts/linter/runner.py
+++ b/buildscripts/linter/runner.py
@@ -86,17 +86,7 @@ def _find_linter(linter, config_dict):
# On Linux, these scripts are installed in %PYTHONDIR%\bin like
# '/opt/mongodbtoolchain/v3/bin', but they may point to the wrong interpreter.
cmd_str = os.path.join(python_dir, linter.cmd_name)
-
- if linter.ignore_interpreter():
- # Some linters use a different interpreter then the current interpreter.
- # If the linter cmd_location is specified then use that location.
- if linter.cmd_location:
- cmd_str = linter.cmd_location
- else:
- cmd_str = os.path.join('/opt/mongodbtoolchain/v3/bin', linter.cmd_name)
- cmd = [cmd_str]
- else:
- cmd = [sys.executable, cmd_str]
+ cmd = [sys.executable, cmd_str]
# Check 1: interpreter location or for linters that ignore current interpreter.
if _check_version(linter, cmd, linter.get_lint_version_cmd_args()):