From 9c37eeebb18ced8df40608ec38948334ec806033 Mon Sep 17 00:00:00 2001 From: RhodeCode Admin Date: Tue, 18 Jul 2023 10:59:21 +0200 Subject: [PATCH] models: removed utf8 markers --- rhodecode/model/__init__.py | 1 - rhodecode/model/auth_token.py | 2 +- rhodecode/model/changeset_status.py | 1 - rhodecode/model/comment.py | 2 +- rhodecode/model/db.py | 1 - rhodecode/model/forms.py | 1 - rhodecode/model/gist.py | 2 +- rhodecode/model/integration.py | 2 +- rhodecode/model/meta.py | 1 - rhodecode/model/notification.py | 2 +- rhodecode/model/permission.py | 1 - rhodecode/model/pull_request.py | 2 +- rhodecode/model/repo.py | 1 - rhodecode/model/repo_group.py | 2 +- rhodecode/model/repo_permission.py | 2 +- rhodecode/model/scm.py | 1 - rhodecode/model/settings.py | 1 - rhodecode/model/ssh_key.py | 2 +- rhodecode/model/update.py | 2 +- rhodecode/model/user.py | 1 - rhodecode/model/user_group.py | 2 +- rhodecode/model/validation_schema/__init__.py | 2 +- rhodecode/model/validation_schema/preparers.py | 2 +- rhodecode/model/validation_schema/schemas/__init__.py | 2 +- .../model/validation_schema/schemas/comment_schema.py | 2 +- rhodecode/model/validation_schema/schemas/gist_schema.py | 2 +- .../validation_schema/schemas/integration_schema.py | 2 +- .../model/validation_schema/schemas/repo_group_schema.py | 2 +- rhodecode/model/validation_schema/schemas/repo_schema.py | 2 +- .../model/validation_schema/schemas/reviewer_schema.py | 2 +- .../model/validation_schema/schemas/search_schema.py | 2 +- .../model/validation_schema/schemas/user_group_schema.py | 2 +- rhodecode/model/validation_schema/schemas/user_schema.py | 2 +- rhodecode/model/validation_schema/types.py | 2 +- rhodecode/model/validation_schema/utils.py | 2 +- rhodecode/model/validation_schema/validators.py | 2 +- rhodecode/model/validation_schema/widgets.py | 2 +- rhodecode/model/validators.py | 9 +++++---- 38 files changed, 32 insertions(+), 41 deletions(-) diff --git a/rhodecode/model/__init__.py b/rhodecode/model/__init__.py index adf37175..992d0e2f 100644 --- a/rhodecode/model/__init__.py +++ b/rhodecode/model/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2010-2020 RhodeCode GmbH # diff --git a/rhodecode/model/auth_token.py b/rhodecode/model/auth_token.py index 1917fb9c..f6e8c581 100644 --- a/rhodecode/model/auth_token.py +++ b/rhodecode/model/auth_token.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2013-2020 RhodeCode GmbH # diff --git a/rhodecode/model/changeset_status.py b/rhodecode/model/changeset_status.py index 89790bd1..0aeb9228 100644 --- a/rhodecode/model/changeset_status.py +++ b/rhodecode/model/changeset_status.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2010-2020 RhodeCode GmbH # diff --git a/rhodecode/model/comment.py b/rhodecode/model/comment.py index 3f63399b..b81b55af 100644 --- a/rhodecode/model/comment.py +++ b/rhodecode/model/comment.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2011-2020 RhodeCode GmbH # diff --git a/rhodecode/model/db.py b/rhodecode/model/db.py index 8d299721..d27d752f 100644 --- a/rhodecode/model/db.py +++ b/rhodecode/model/db.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2010-2020 RhodeCode GmbH # diff --git a/rhodecode/model/forms.py b/rhodecode/model/forms.py index 96949f01..1ebd51e1 100644 --- a/rhodecode/model/forms.py +++ b/rhodecode/model/forms.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2010-2020 RhodeCode GmbH # diff --git a/rhodecode/model/gist.py b/rhodecode/model/gist.py index 3c51d08c..d099df86 100644 --- a/rhodecode/model/gist.py +++ b/rhodecode/model/gist.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2013-2020 RhodeCode GmbH # diff --git a/rhodecode/model/integration.py b/rhodecode/model/integration.py index 6417bd4a..1cbe2543 100644 --- a/rhodecode/model/integration.py +++ b/rhodecode/model/integration.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2011-2020 RhodeCode GmbH # diff --git a/rhodecode/model/meta.py b/rhodecode/model/meta.py index 2b738a5c..bf60fc43 100644 --- a/rhodecode/model/meta.py +++ b/rhodecode/model/meta.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2010-2020 RhodeCode GmbH # diff --git a/rhodecode/model/notification.py b/rhodecode/model/notification.py index 6bf212bf..022cff80 100644 --- a/rhodecode/model/notification.py +++ b/rhodecode/model/notification.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2011-2020 RhodeCode GmbH # diff --git a/rhodecode/model/permission.py b/rhodecode/model/permission.py index 1f11a95f..eeae1a4a 100644 --- a/rhodecode/model/permission.py +++ b/rhodecode/model/permission.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2010-2020 RhodeCode GmbH # diff --git a/rhodecode/model/pull_request.py b/rhodecode/model/pull_request.py index fddb44d6..cfa27f8d 100644 --- a/rhodecode/model/pull_request.py +++ b/rhodecode/model/pull_request.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2012-2020 RhodeCode GmbH # diff --git a/rhodecode/model/repo.py b/rhodecode/model/repo.py index 05dc71c6..c35633f4 100644 --- a/rhodecode/model/repo.py +++ b/rhodecode/model/repo.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2010-2020 RhodeCode GmbH # diff --git a/rhodecode/model/repo_group.py b/rhodecode/model/repo_group.py index b937865b..76c8d13f 100644 --- a/rhodecode/model/repo_group.py +++ b/rhodecode/model/repo_group.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2011-2020 RhodeCode GmbH # diff --git a/rhodecode/model/repo_permission.py b/rhodecode/model/repo_permission.py index 797f6a6e..cc757d37 100644 --- a/rhodecode/model/repo_permission.py +++ b/rhodecode/model/repo_permission.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2011-2020 RhodeCode GmbH # diff --git a/rhodecode/model/scm.py b/rhodecode/model/scm.py index 8beadb0c..91fdd0d9 100644 --- a/rhodecode/model/scm.py +++ b/rhodecode/model/scm.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2010-2020 RhodeCode GmbH # diff --git a/rhodecode/model/settings.py b/rhodecode/model/settings.py index 428bd96d..724d96b9 100644 --- a/rhodecode/model/settings.py +++ b/rhodecode/model/settings.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2010-2020 RhodeCode GmbH # diff --git a/rhodecode/model/ssh_key.py b/rhodecode/model/ssh_key.py index 03aa98c1..8fa9cc5f 100644 --- a/rhodecode/model/ssh_key.py +++ b/rhodecode/model/ssh_key.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2013-2020 RhodeCode GmbH # diff --git a/rhodecode/model/update.py b/rhodecode/model/update.py index 67a8033e..96363c1a 100644 --- a/rhodecode/model/update.py +++ b/rhodecode/model/update.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2013-2020 RhodeCode GmbH # diff --git a/rhodecode/model/user.py b/rhodecode/model/user.py index 2763cc4c..be58daee 100644 --- a/rhodecode/model/user.py +++ b/rhodecode/model/user.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2010-2020 RhodeCode GmbH # diff --git a/rhodecode/model/user_group.py b/rhodecode/model/user_group.py index 4dea026e..f2ac8258 100644 --- a/rhodecode/model/user_group.py +++ b/rhodecode/model/user_group.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2011-2020 RhodeCode GmbH # diff --git a/rhodecode/model/validation_schema/__init__.py b/rhodecode/model/validation_schema/__init__.py index 2a1a395e..5a35cd75 100644 --- a/rhodecode/model/validation_schema/__init__.py +++ b/rhodecode/model/validation_schema/__init__.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2016-2020 RhodeCode GmbH # diff --git a/rhodecode/model/validation_schema/preparers.py b/rhodecode/model/validation_schema/preparers.py index a1c3b2b1..c51ab9a4 100644 --- a/rhodecode/model/validation_schema/preparers.py +++ b/rhodecode/model/validation_schema/preparers.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2016-2020 RhodeCode GmbH # diff --git a/rhodecode/model/validation_schema/schemas/__init__.py b/rhodecode/model/validation_schema/schemas/__init__.py index 034f2507..c0c1e58e 100644 --- a/rhodecode/model/validation_schema/schemas/__init__.py +++ b/rhodecode/model/validation_schema/schemas/__init__.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2016-2020 RhodeCode GmbH # diff --git a/rhodecode/model/validation_schema/schemas/comment_schema.py b/rhodecode/model/validation_schema/schemas/comment_schema.py index 3e69185f..73f4ca7d 100644 --- a/rhodecode/model/validation_schema/schemas/comment_schema.py +++ b/rhodecode/model/validation_schema/schemas/comment_schema.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2017-2020 RhodeCode GmbH # diff --git a/rhodecode/model/validation_schema/schemas/gist_schema.py b/rhodecode/model/validation_schema/schemas/gist_schema.py index 4e07c493..15c2a1a6 100644 --- a/rhodecode/model/validation_schema/schemas/gist_schema.py +++ b/rhodecode/model/validation_schema/schemas/gist_schema.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2016-2020 RhodeCode GmbH # diff --git a/rhodecode/model/validation_schema/schemas/integration_schema.py b/rhodecode/model/validation_schema/schemas/integration_schema.py index b960f463..802ccfc0 100644 --- a/rhodecode/model/validation_schema/schemas/integration_schema.py +++ b/rhodecode/model/validation_schema/schemas/integration_schema.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2016-2020 RhodeCode GmbH # diff --git a/rhodecode/model/validation_schema/schemas/repo_group_schema.py b/rhodecode/model/validation_schema/schemas/repo_group_schema.py index 58b557ae..f0cb7743 100644 --- a/rhodecode/model/validation_schema/schemas/repo_group_schema.py +++ b/rhodecode/model/validation_schema/schemas/repo_group_schema.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2016-2020 RhodeCode GmbH # diff --git a/rhodecode/model/validation_schema/schemas/repo_schema.py b/rhodecode/model/validation_schema/schemas/repo_schema.py index 57a5788d..29a68e9e 100644 --- a/rhodecode/model/validation_schema/schemas/repo_schema.py +++ b/rhodecode/model/validation_schema/schemas/repo_schema.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2016-2020 RhodeCode GmbH # diff --git a/rhodecode/model/validation_schema/schemas/reviewer_schema.py b/rhodecode/model/validation_schema/schemas/reviewer_schema.py index 8e68073e..6b89f83e 100644 --- a/rhodecode/model/validation_schema/schemas/reviewer_schema.py +++ b/rhodecode/model/validation_schema/schemas/reviewer_schema.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2016-2020 RhodeCode GmbH # diff --git a/rhodecode/model/validation_schema/schemas/search_schema.py b/rhodecode/model/validation_schema/schemas/search_schema.py index baf52155..43ca5b24 100644 --- a/rhodecode/model/validation_schema/schemas/search_schema.py +++ b/rhodecode/model/validation_schema/schemas/search_schema.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2016-2020 RhodeCode GmbH # diff --git a/rhodecode/model/validation_schema/schemas/user_group_schema.py b/rhodecode/model/validation_schema/schemas/user_group_schema.py index 3f600e65..2f3bc39f 100644 --- a/rhodecode/model/validation_schema/schemas/user_group_schema.py +++ b/rhodecode/model/validation_schema/schemas/user_group_schema.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2016-2020 RhodeCode GmbH # diff --git a/rhodecode/model/validation_schema/schemas/user_schema.py b/rhodecode/model/validation_schema/schemas/user_schema.py index 3da05ea0..194fa348 100644 --- a/rhodecode/model/validation_schema/schemas/user_schema.py +++ b/rhodecode/model/validation_schema/schemas/user_schema.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2016-2020 RhodeCode GmbH # diff --git a/rhodecode/model/validation_schema/types.py b/rhodecode/model/validation_schema/types.py index 58009951..af6824d7 100644 --- a/rhodecode/model/validation_schema/types.py +++ b/rhodecode/model/validation_schema/types.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2016-2020 RhodeCode GmbH # diff --git a/rhodecode/model/validation_schema/utils.py b/rhodecode/model/validation_schema/utils.py index 019c2ba9..945f417a 100644 --- a/rhodecode/model/validation_schema/utils.py +++ b/rhodecode/model/validation_schema/utils.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2016-2020 RhodeCode GmbH # diff --git a/rhodecode/model/validation_schema/validators.py b/rhodecode/model/validation_schema/validators.py index ada71307..230eb86d 100644 --- a/rhodecode/model/validation_schema/validators.py +++ b/rhodecode/model/validation_schema/validators.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2011-2020 RhodeCode GmbH # diff --git a/rhodecode/model/validation_schema/widgets.py b/rhodecode/model/validation_schema/widgets.py index e07fa3c1..ac62df35 100644 --- a/rhodecode/model/validation_schema/widgets.py +++ b/rhodecode/model/validation_schema/widgets.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- + # Copyright (C) 2011-2020 RhodeCode GmbH # diff --git a/rhodecode/model/validators.py b/rhodecode/model/validators.py index ff4a637b..5eac02db 100644 --- a/rhodecode/model/validators.py +++ b/rhodecode/model/validators.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright (C) 2010-2020 RhodeCode GmbH # @@ -90,17 +89,18 @@ def UniqueList(localizer, convert=None): """ Unique List ! """ + accept_iterator = True + messages = { 'empty': _('Value cannot be an empty list'), 'missing_value': _('Value cannot be an empty list'), } def _convert_to_python(self, value, state): - ret_val = [] - def make_unique(value): + def make_unique(_value): seen = [] - return [c for c in value if not (c in seen or seen.append(c))] + return [c for c in _value if not (c in seen or seen.append(c))] if isinstance(value, list): ret_val = make_unique(value) @@ -119,6 +119,7 @@ def UniqueList(localizer, convert=None): def empty_value(self, value): return [] + return _validator