summaryrefslogtreecommitdiff
path: root/keystoneclient/base.py
diff options
context:
space:
mode:
authorNavid Pustchi <npustchi@gmail.com>2016-05-04 19:14:01 +0000
committerNavid Pustchi <npustchi@gmail.com>2016-05-04 19:47:14 +0000
commit01500be7fb8d4fdf6d072a1eacf4df87abe86c8c (patch)
tree0dc74328f8e8104acdc60e72e81b44e985f4ed0f /keystoneclient/base.py
parent4c180e691fe1deed3b253016c28e8f6987436074 (diff)
downloadpython-keystoneclient-01500be7fb8d4fdf6d072a1eacf4df87abe86c8c.tar.gz
Fixing D105 PEP257
Currently tox ignores D105. D105: Missing docstring in magic method. This change removes it and make keystoneclient docstring compliant with it. Change-Id: I34dfc164891880425f542f8f8aa3426ec8640c96
Diffstat (limited to 'keystoneclient/base.py')
-rw-r--r--keystoneclient/base.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/keystoneclient/base.py b/keystoneclient/base.py
index 8b36123..d028d97 100644
--- a/keystoneclient/base.py
+++ b/keystoneclient/base.py
@@ -460,6 +460,7 @@ class Resource(object):
self._loaded = loaded
def __repr__(self):
+ """Return string representation of resource attributes."""
reprkeys = sorted(k
for k in self.__dict__.keys()
if k[0] != '_' and k != 'manager')
@@ -485,6 +486,7 @@ class Resource(object):
pass
def __getattr__(self, k):
+ """Checking attrbiute existence."""
if k not in self.__dict__:
# NOTE(bcwaldon): disallow lazy-loading if already loaded once
if not self.is_loaded():
@@ -513,6 +515,7 @@ class Resource(object):
{'x_request_id': self.manager.client.last_request_id})
def __eq__(self, other):
+ """Define equality for resources."""
if not isinstance(other, Resource):
return NotImplemented
# two resources of different types are not equal