Mercurial > kallithea
changeset 7814:f0e8d673f2a2
flake8: fix F632 use ==/!= to compare str, bytes, and int literals
- even if the values probably would have been interned ...
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Sat, 03 Aug 2019 23:31:43 +0200 |
parents | f79b864dc192 |
children | 72c4b2d720ea |
files | kallithea/lib/vcs/utils/helpers.py kallithea/model/validators.py |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/vcs/utils/helpers.py Sun Aug 04 00:13:03 2019 +0200 +++ b/kallithea/lib/vcs/utils/helpers.py Sat Aug 03 23:31:43 2019 +0200 @@ -51,7 +51,7 @@ raise VCSError('More than one [%s] scm found at given path %s' % (', '.join((x[0] for x in found_scms)), path)) - if len(found_scms) is 0: + if len(found_scms) == 0: raise VCSError('No scm found at given path %s' % path) return found_scms[0]
--- a/kallithea/model/validators.py Sun Aug 04 00:13:03 2019 +0200 +++ b/kallithea/model/validators.py Sat Aug 03 23:31:43 2019 +0200 @@ -583,11 +583,11 @@ # update permissions for k, v, t in perms_new: try: - if t is 'user': + if t == 'user': self.user_db = User.query() \ .filter(User.active == True) \ .filter(User.username == k).one() - if t is 'users_group': + if t == 'users_group': self.user_db = UserGroup.query() \ .filter(UserGroup.users_group_active == True) \ .filter(UserGroup.users_group_name == k).one()