Skip to content

Commit

Permalink
try changing option name in case of shadowing
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Feb 20, 2019
1 parent f5511b2 commit a792fb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ class PythonToolBase(Subsystem):
default_requirements = None
default_entry_point = None
# Subclasses need not override.
default_interpreter_constraints = []
default_interpreter_version_constraints = []

@classmethod
def register_options(cls, register):
super(PythonToolBase, cls).register_options(register)
register('--interpreter-constraints', type=list, advanced=True, fingerprint=True,
default=cls.default_interpreter_constraints,
register('--interpreter-version-constraints', type=list, advanced=True, fingerprint=True,
default=cls.default_interpreter_version_constraints,
help='Python interpreter constraints for this tool.')
register('--requirements', type=list, advanced=True, fingerprint=True,
default=cls.default_requirements,
Expand All @@ -30,7 +30,7 @@ def register_options(cls, register):
help='The main module for the tool.')

def get_interpreter_constraints(self):
return self.get_options().interpreter_constraints
return self.get_options().interpreter_version_constraints

def get_requirement_specs(self):
return self.get_options().requirements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def _assert_tool_execution_for_python_version(self, use_py3=True):
tool_prep_type = self.synthesize_task_subtype(ToolPrep, 'tp_scope_py{}'.format(scope_string))
context = self.context(for_task_types=[tool_prep_type], for_subsystems=[Tool], options={
'test-tool': {
'interpreter_constraints': [constraint_string],
'interpreter_version_constraints': [constraint_string],
},
})
# XDG_CACHE_HOME overrides the location of the cache dir.
Expand Down

0 comments on commit a792fb8

Please sign in to comment.