From ef41174c2e4c5e427f592caaa33eaa089b3aae2a Mon Sep 17 00:00:00 2001 From: Danny McClanahan <1305167+cosmicexplorer@users.noreply.github.com> Date: Fri, 20 Jul 2018 12:22:07 -0700 Subject: [PATCH] convert `Exactly` -> `SubclassesOf` as per review comments --- .../pants/backend/python/subsystems/python_native_code.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/python/pants/backend/python/subsystems/python_native_code.py b/src/python/pants/backend/python/subsystems/python_native_code.py index b567bfce142e..6c51ea600f99 100644 --- a/src/python/pants/backend/python/subsystems/python_native_code.py +++ b/src/python/pants/backend/python/subsystems/python_native_code.py @@ -15,7 +15,7 @@ from pants.base.exceptions import IncompatiblePlatformsError from pants.subsystem.subsystem import Subsystem from pants.util.memo import memoized_property -from pants.util.objects import Exactly, SubclassesOf +from pants.util.objects import SubclassesOf class PythonNativeCode(Subsystem): @@ -63,7 +63,7 @@ def native_target_has_native_sources(self, target): @memoized_property def _native_target_matchers(self): return { - Exactly(PythonDistribution): self.pydist_has_native_sources, + SubclassesOf(PythonDistribution): self.pydist_has_native_sources, SubclassesOf(NativeLibrary): self.native_target_has_native_sources, } @@ -97,7 +97,7 @@ def get_targets_by_declared_platform(self, targets): '--platforms option or a pants.ini file.'] return targets_by_platforms - _PYTHON_PLATFORM_TARGETS_CONSTRAINT = Exactly(PythonBinary, PythonDistribution) + _PYTHON_PLATFORM_TARGETS_CONSTRAINT = SubclassesOf(PythonBinary, PythonDistribution) def check_build_for_current_platform_only(self, targets): """