Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize all names in ResolvableSet. Fixes #147. #148

Merged
merged 1 commit into from
Aug 12, 2015

Conversation

wickman
Copy link
Contributor

@wickman wickman commented Aug 11, 2015

No description provided.

@@ -56,6 +58,10 @@ def merge(self, other):


class _ResolvableSet(object):
@classmethod
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just generally always use classmethods instead of staticmethods to allow for future subclassing/testing. For example, we could write an implementation like so:

class BuggyResolvableSet(_ResolvableSet):
  @classmethod
  def normalize(cls, name):
    return name

and then assert that it fails when running the same test suite as the regular implementation.

As it stands, we're subclassing it nowhere and it's an internal class so it doesn't really give us any leverage over a staticmethod but why be inconsistent.

@kwlzn
Copy link
Contributor

kwlzn commented Aug 12, 2015

LGTM - one comment.

@jsirois
Copy link
Member

jsirois commented Aug 12, 2015

LGTM

wickman added a commit that referenced this pull request Aug 12, 2015
Normalize all names in ResolvableSet.  Fixes #147.
@wickman wickman merged commit ab9c28b into pex-tool:master Aug 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants