Skip to content

Commit

Permalink
convert Exactly -> SubclassesOf as per review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmicexplorer committed Jul 20, 2018
1 parent 643417e commit ef41174
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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,
}

Expand Down Expand Up @@ -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):
"""
Expand Down

0 comments on commit ef41174

Please sign in to comment.