Mercurial > kallithea
changeset 8759:0b1a23b88f9a
cleanup: get rid of redundant assignments 'foo = foo'
Redundant assignments were searched with:
grep '^ *\(.*\) = \1$' `hg files`
Some of these cases have resulted from earlier cleanup, like:
foo = safe_unicode(foo)
and later batch removing safe_unicode usage. See e.g. commit
e35373106528b29461b7f5144780cb9ec79f765d .
Note: two false positives occur:
kallithea/tests/models/test_settings.py:39:
setting.app_settings_value = setting.app_settings_value
kallithea/tests/models/test_settings.py:42:
setting.app_settings_value = setting.app_settings_value
which is not a plain assignment but where 'app_settings_value' is a property
method with side effects.
author | Thomas De Schampheleire <thomas.de_schampheleire@nokia.com> |
---|---|
date | Sat, 07 Nov 2020 20:59:03 +0100 |
parents | d437cc48bc42 |
children | 9ead754dd0a4 |
files | kallithea/controllers/api/api.py kallithea/model/repo.py kallithea/model/scm.py kallithea/tests/scripts/manual_test_crawler.py |
diffstat | 4 files changed, 0 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/controllers/api/api.py Fri Nov 06 21:58:06 2020 +0100 +++ b/kallithea/controllers/api/api.py Sat Nov 07 20:59:03 2020 +0100 @@ -1143,7 +1143,6 @@ if not HasRepoPermissionLevel('read')(repo.repo_name): raise JSONRPCError('repository `%s` does not exist' % (repoid,)) - ret_type = ret_type _map = {} try: _d, _f = ScmModel().get_nodes(repo, revision, root_path,
--- a/kallithea/model/repo.py Fri Nov 06 21:58:06 2020 +0100 +++ b/kallithea/model/repo.py Sat Nov 07 20:59:03 2020 +0100 @@ -321,8 +321,6 @@ fork_of = db.Repository.guess_instance(fork_of) repo_group = db.RepoGroup.guess_instance(repo_group) try: - repo_name = repo_name - description = description # repo name is just a name of repository # while repo_name_full is a full qualified name that is combined # with name and path of group
--- a/kallithea/model/scm.py Fri Nov 06 21:58:06 2020 +0100 +++ b/kallithea/model/scm.py Sat Nov 07 20:59:03 2020 +0100 @@ -451,7 +451,6 @@ content = content.read() processed_nodes.append((f_path, content)) - message = message committer = user.full_contact if not author: author = committer @@ -493,7 +492,6 @@ user = db.User.guess_instance(user) scm_instance = repo.scm_instance_no_cache() - message = message committer = user.full_contact if not author: author = committer @@ -572,7 +570,6 @@ content = nodes[f_path].get('content') processed_nodes.append((f_path, content)) - message = message committer = user.full_contact if not author: author = committer
--- a/kallithea/tests/scripts/manual_test_crawler.py Fri Nov 06 21:58:06 2020 +0100 +++ b/kallithea/tests/scripts/manual_test_crawler.py Sat Nov 07 20:59:03 2020 +0100 @@ -83,7 +83,6 @@ def _get_repo(proj): if isinstance(proj, str): repo = vcs.get_repo(os.path.join(PROJECT_PATH, proj)) - proj = proj else: repo = proj proj = repo.name