Skip to content

Commit

Permalink
Using staticmethods when self not used.
Browse files Browse the repository at this point in the history
  • Loading branch information
dhermes committed Oct 3, 2014
1 parent 7591229 commit 7e98f53
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion gcloud/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def run(self):

interact('(Hit CTRL-D to exit...)', local=self.LOCALS)

def wait(self): # pylint: disable=no-self-use
@staticmethod

This comment has been minimized.

Copy link
@tseaver

tseaver Oct 3, 2014

Contributor

I like removing the cause rather than suppressing the warning.

This comment has been minimized.

Copy link
@dhermes

dhermes Oct 3, 2014

Author Contributor

I'll do my best to make this happen.

Inheriting from classes like unittest2.TestCase make it impossible to avoid certain pylint warnings.

This comment has been minimized.

Copy link
@tseaver

tseaver Oct 3, 2014

Contributor

Those kinds of errors are the ones I think we should suppress globally via an RC file.

This comment has been minimized.

Copy link
@dhermes

dhermes Oct 3, 2014

Author Contributor

Yup. I'm working on it, currently trying to understand how pylint plugins work and see if any existing work has been done with Sphinx.

def wait():
raw_input()

@classmethod
Expand Down
3 changes: 2 additions & 1 deletion gcloud/test_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

class TestConnection(unittest2.TestCase): # pylint: disable=R0904

def _getTargetClass(self): # pylint: disable=invalid-name,no-self-use
@staticmethod
def _getTargetClass(): # pylint: disable=invalid-name
from gcloud.connection import Connection
return Connection

Expand Down
3 changes: 2 additions & 1 deletion gcloud/test_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

class TestCredentials(unittest2.TestCase): # pylint: disable=R0904

def _getTargetClass(self): # pylint: disable=invalid-name,no-self-use
@staticmethod
def _getTargetClass(): # pylint: disable=invalid-name
from gcloud.credentials import Credentials
return Credentials

Expand Down

0 comments on commit 7e98f53

Please sign in to comment.