Repository: incubator-ariatosca Updated Branches: refs/heads/pylint-aria-storage 7064c90ce -> 4bf3a70ab
review fixups Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/4bf3a70a Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/4bf3a70a Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/4bf3a70a Branch: refs/heads/pylint-aria-storage Commit: 4bf3a70abd1f328780df45b692198bc5d6d0d22b Parents: 7064c90 Author: mxmrlv <[email protected]> Authored: Thu Oct 20 17:39:01 2016 +0300 Committer: mxmrlv <[email protected]> Committed: Thu Oct 20 17:39:01 2016 +0300 ---------------------------------------------------------------------- aria/storage/__init__.py | 2 -- aria/storage/drivers.py | 2 +- aria/storage/models.py | 6 +++--- aria/storage/structures.py | 6 ++---- 4 files changed, 6 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/4bf3a70a/aria/storage/__init__.py ---------------------------------------------------------------------- diff --git a/aria/storage/__init__.py b/aria/storage/__init__.py index 028bcdc..20c73a6 100644 --- a/aria/storage/__init__.py +++ b/aria/storage/__init__.py @@ -105,7 +105,6 @@ class ModelStorage(Storage): """ Registers the model type in the resource storage manager. :param model_cls: the model to register. - :return: """ model_name = generate_lower_name(model_cls) model_api = _ModelApi(model_name, self.driver, model_cls) @@ -372,7 +371,6 @@ class ResourceStorage(Storage): """ Registers the resource type in the resource storage manager. :param resource: the resource to register. - :return: """ self.registered[resource] = ResourceApi(self.driver, resource_name=resource) http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/4bf3a70a/aria/storage/drivers.py ---------------------------------------------------------------------- diff --git a/aria/storage/drivers.py b/aria/storage/drivers.py index 1a198d3..0ad2f49 100644 --- a/aria/storage/drivers.py +++ b/aria/storage/drivers.py @@ -29,7 +29,7 @@ classes: import os import shutil -# pylint has an issue with distuls and virtualenvs: https://github.com/PyCQA/pylint/issues/73 +# pylint has an issue with distutils and virtualenvs: https://github.com/PyCQA/pylint/issues/73 import distutils.dir_util # pylint: disable=no-name-in-module, import-error from functools import partial from multiprocessing import RLock http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/4bf3a70a/aria/storage/models.py ---------------------------------------------------------------------- diff --git a/aria/storage/models.py b/aria/storage/models.py index 1601324..cfca25c 100644 --- a/aria/storage/models.py +++ b/aria/storage/models.py @@ -281,7 +281,7 @@ class Node(Model): """ Retreives all of the relationship by target. :param target_id: the node id of the target of the relationship - :return: + :yields: a relationship which target and node with the specified target_id """ for relationship in self.relationships: if relationship.target_id == target_id: @@ -337,8 +337,8 @@ class NodeInstance(Model): def relationships_by_target(self, target_id): """ Retreives all of the relationship by target. - :param target_id: the instance id of the target of the relationship - :return: + :param target_id: the instance id of the target of the relationship + :yields: a relationship instance which target and node with the specified target_id """ for relationship_instance in self.relationship_instances: if relationship_instance.target_id == target_id: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/4bf3a70a/aria/storage/structures.py ---------------------------------------------------------------------- diff --git a/aria/storage/structures.py b/aria/storage/structures.py index 8fb3e53..ea4cf3a 100644 --- a/aria/storage/structures.py +++ b/aria/storage/structures.py @@ -50,7 +50,6 @@ __all__ = ( def uuid_generator(): """ wrapper function which generates ids - :return: """ return str(uuid4()) @@ -184,7 +183,6 @@ class Model(object): """ Base class for all of the storage models. """ - # Setting id to avoid missing class member is usage id = None def __init__(self, **fields): @@ -220,8 +218,8 @@ class Model(object): @property def fields(self): """ - iterates over the fields of the model. - :return: + Iterates over the fields of the model. + :yields: the class's field name """ for name, field in vars(self.__class__).items(): if isinstance(field, Field):
