# HG changeset patch # User Na'Tosha Bard # Date 2014-09-19 10:54:51 # Node ID 1f94dd1e27572815b3c92b032f86335de5f78ad4 # Parent 54df936a9bd385b6d06e3642df27cba545138442 Fix readability issues in comments diff --git a/kallithea/model/changeset_status.py b/kallithea/model/changeset_status.py --- a/kallithea/model/changeset_status.py +++ b/kallithea/model/changeset_status.py @@ -129,7 +129,7 @@ class ChangesetStatusModel(BaseModel): pull_request=None, dont_allow_on_closed_pull_request=False): """ Creates new status for changeset or updates the old ones bumping their - version, leaving the current status at + version, leaving the current status at the value of 'status'. :param repo: :param status: diff --git a/kallithea/model/db.py b/kallithea/model/db.py --- a/kallithea/model/db.py +++ b/kallithea/model/db.py @@ -1074,7 +1074,7 @@ class Repository(Base, BaseModel): @classmethod def base_path(cls): """ - Returns base path when all repos are stored + Returns base path where all repos are stored :param cls: """ @@ -2466,7 +2466,7 @@ class Gist(Base, BaseModel): @classmethod def base_path(cls): """ - Returns base path when all gists are stored + Returns base path where all gists are stored :param cls: """ diff --git a/kallithea/model/permission.py b/kallithea/model/permission.py --- a/kallithea/model/permission.py +++ b/kallithea/model/permission.py @@ -59,8 +59,9 @@ class PermissionModel(BaseModel): def create_default_permissions(self, user, force=False): """ - Creates only missing default permissions for user, if force is set it - resets the default permissions for that user + Create missing default permissions for user. If force is set, the default + permissions for the user are reset, otherwise only missing permissions are + created. :param user: """ @@ -86,8 +87,8 @@ class PermissionModel(BaseModel): self.sa.delete(perm) self.sa.commit() defined_perms_groups = [] - # for every default permission that needs to be created, we check if - # it's group is already defined, if it's not we create default perm + # For every default permission that needs to be created, we check if + # its group is already defined. If it's not, we create default permission. for perm_name in DEFAULT_PERMS: gr = _get_group(perm_name) if gr not in defined_perms_groups: diff --git a/kallithea/model/repo.py b/kallithea/model/repo.py --- a/kallithea/model/repo.py +++ b/kallithea/model/repo.py @@ -379,8 +379,8 @@ class RepoModel(BaseModel): enable_locking=False, enable_downloads=False, copy_group_permissions=False, state=Repository.STATE_PENDING): """ - Create repository inside database with PENDING state, this should be - only executed by create() repo. With exception of importing existing repos + Create repository inside database with PENDING state. This should only be + executed by create() repo, with exception of importing existing repos. """ from kallithea.model.scm import ScmModel @@ -681,9 +681,8 @@ class RepoModel(BaseModel): def _create_filesystem_repo(self, repo_name, repo_type, repo_group, clone_uri=None, repo_store_location=None): """ - makes repository on filesystem. It's group aware means it'll create - a repository within a group, and alter the paths accordingly of - group location + Makes repository on filesystem. Operation is group aware, meaning that it will create + a repository within a group, and alter the paths accordingly to the group location. :param repo_name: :param alias: diff --git a/kallithea/model/scm.py b/kallithea/model/scm.py --- a/kallithea/model/scm.py +++ b/kallithea/model/scm.py @@ -80,8 +80,7 @@ class RepoTemp(object): class CachedRepoList(object): """ - Cached repo list, uses in-memory cache after initialization, that is - super fast + Cached repo list. Uses super-fast in-memory cache after initialization. """ def __init__(self, db_repo_list, repos_path, order_by=None, perm_set=None): @@ -580,8 +579,7 @@ class ScmModel(BaseModel): def get_nodes(self, repo_name, revision, root_path='/', flat=True): """ - recursive walk in root dir and return a set of all path in that dir - based on repository walk function + Recursively walk root dir and return a set of all paths found. :param repo_name: name of repository :param revision: revision for which to list nodes @@ -611,7 +609,7 @@ class ScmModel(BaseModel): def create_nodes(self, user, repo, message, nodes, parent_cs=None, author=None, trigger_push_hook=True): """ - Commits given multiple nodes into repo + Commits specified nodes to repo. :param user: Kallithea User object or user_id, the commiter :param repo: Kallithea Repository object @@ -736,7 +734,7 @@ class ScmModel(BaseModel): def delete_nodes(self, user, repo, message, nodes, parent_cs=None, author=None, trigger_push_hook=True): """ - Deletes given multiple nodes into repo + Deletes specified nodes from repo. :param user: Kallithea User object or user_id, the commiter :param repo: Kallithea Repository object