Skip to content

Commit

Permalink
Enable New Style class check
Browse files Browse the repository at this point in the history
* update pants.ini to enable new style class checks
* cleanup problems in existing code base.

Testing Done:
https://travis-ci.org/pantsbuild/pants/builds/80334805

Bugs closed: 1905, 2194

Reviewed at https://rbcommons.com/s/twitter/r/2820/
  • Loading branch information
digwanderlust authored and jsirois committed Sep 14, 2015
1 parent 04f09bf commit b0143bc
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pants.ini
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ skip: True
skip: True

[pycheck-newstyle-classes]
skip: True
skip: False

[pycheck-context-manager]
skip: True
Expand Down
4 changes: 2 additions & 2 deletions src/python/pants/reporting/invalidation_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
from pants.base.target import Target


class InvalidationReport:
class InvalidationReport(object):
"""Creates a report of all versioned target sets seen in the build."""

class TaskReport:
class TaskReport(object):
class TaskEntry(namedtuple('TaskEntry', ['targets_hash', 'target_ids', 'cache_key_id',
'cache_key_hash', 'phase', 'valid'])):
"""
Expand Down
6 changes: 3 additions & 3 deletions src/python/pants/scm/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,19 +363,19 @@ def isdir(self, relpath):
return path.endswith('/')
return False

class Symlink:
class Symlink(object):

def __init__(self, name, sha):
self.name = name
self.sha = sha

class Dir:
class Dir(object):

def __init__(self, name, sha):
self.name = name
self.sha = sha

class File:
class File(object):

def __init__(self, name, sha):
self.name = name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def test_calculate_sources_with_source_root(self):
self.assertEquals(1, len(result.keys()))
self.assertEquals(OrderedSet(['project/src/main/proto/proto-lib/foo.proto']), result['project/src/main/proto'])

class MockLogger:
class MockLogger(object):

def __init__(self):
self._warn = []
Expand Down
2 changes: 1 addition & 1 deletion tests/python/pants_test/tasks/test_jar_publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def test_publish_classifiers(self):
self.assertEquals(r, c)


class FailNTimes:
class FailNTimes(object):

def __init__(self, tries, exc_type, success=None):
self.tries = tries
Expand Down

0 comments on commit b0143bc

Please sign in to comment.