##// END OF EJS Templates
scripts: drop isort --wrap-length 160 - it is broken with py3 and not really necessary...
Mads Kiilerich -
r8157:5b1f4302 default
parent child Browse files
Show More
@@ -32,8 +32,8 b' from datetime import datetime'
32 from tg import request
32 from tg import request
33
33
34 from kallithea.controllers.api import JSONRPCController, JSONRPCError
34 from kallithea.controllers.api import JSONRPCController, JSONRPCError
35 from kallithea.lib.auth import (
35 from kallithea.lib.auth import (AuthUser, HasPermissionAny, HasPermissionAnyDecorator, HasRepoGroupPermissionLevel, HasRepoPermissionLevel,
36 AuthUser, HasPermissionAny, HasPermissionAnyDecorator, HasRepoGroupPermissionLevel, HasRepoPermissionLevel, HasUserGroupPermissionLevel)
36 HasUserGroupPermissionLevel)
37 from kallithea.lib.exceptions import DefaultUserException, UserGroupsAssignedException
37 from kallithea.lib.exceptions import DefaultUserException, UserGroupsAssignedException
38 from kallithea.lib.utils import action_logger, repo2db_mapper
38 from kallithea.lib.utils import action_logger, repo2db_mapper
39 from kallithea.lib.utils2 import OAttr, Optional
39 from kallithea.lib.utils2 import OAttr, Optional
@@ -49,8 +49,8 b' from kallithea.lib.utils import action_l'
49 from kallithea.lib.utils2 import convert_line_endings, detect_mode, safe_int, safe_str, str2bool
49 from kallithea.lib.utils2 import convert_line_endings, detect_mode, safe_int, safe_str, str2bool
50 from kallithea.lib.vcs.backends.base import EmptyChangeset
50 from kallithea.lib.vcs.backends.base import EmptyChangeset
51 from kallithea.lib.vcs.conf import settings
51 from kallithea.lib.vcs.conf import settings
52 from kallithea.lib.vcs.exceptions import (
52 from kallithea.lib.vcs.exceptions import (ChangesetDoesNotExistError, ChangesetError, EmptyRepositoryError, ImproperArchiveTypeError, NodeAlreadyExistsError,
53 ChangesetDoesNotExistError, ChangesetError, EmptyRepositoryError, ImproperArchiveTypeError, NodeAlreadyExistsError, NodeDoesNotExistError, NodeError, RepositoryError, VCSError)
53 NodeDoesNotExistError, NodeError, RepositoryError, VCSError)
54 from kallithea.lib.vcs.nodes import FileNode
54 from kallithea.lib.vcs.nodes import FileNode
55 from kallithea.model.db import Repository
55 from kallithea.model.db import Repository
56 from kallithea.model.repo import RepoModel
56 from kallithea.model.repo import RepoModel
@@ -44,8 +44,8 b' from kallithea.lib.caching_query import '
44 from kallithea.lib.utils import conditional_cache, get_repo_group_slug, get_repo_slug, get_user_group_slug
44 from kallithea.lib.utils import conditional_cache, get_repo_group_slug, get_repo_slug, get_user_group_slug
45 from kallithea.lib.utils2 import ascii_bytes, ascii_str, safe_bytes
45 from kallithea.lib.utils2 import ascii_bytes, ascii_str, safe_bytes
46 from kallithea.lib.vcs.utils.lazy import LazyProperty
46 from kallithea.lib.vcs.utils.lazy import LazyProperty
47 from kallithea.model.db import (
47 from kallithea.model.db import (Permission, RepoGroup, Repository, User, UserApiKeys, UserGroup, UserGroupMember, UserGroupRepoGroupToPerm, UserGroupRepoToPerm,
48 Permission, RepoGroup, Repository, User, UserApiKeys, UserGroup, UserGroupMember, UserGroupRepoGroupToPerm, UserGroupRepoToPerm, UserGroupToPerm, UserGroupUserGroupToPerm, UserIpMap, UserToPerm)
48 UserGroupToPerm, UserGroupUserGroupToPerm, UserIpMap, UserToPerm)
49 from kallithea.model.meta import Session
49 from kallithea.model.meta import Session
50 from kallithea.model.user import UserModel
50 from kallithea.model.user import UserModel
51
51
@@ -13,8 +13,8 b' import datetime'
13 import itertools
13 import itertools
14
14
15 from kallithea.lib.vcs.conf import settings
15 from kallithea.lib.vcs.conf import settings
16 from kallithea.lib.vcs.exceptions import (
16 from kallithea.lib.vcs.exceptions import (ChangesetError, EmptyRepositoryError, NodeAlreadyAddedError, NodeAlreadyChangedError, NodeAlreadyExistsError,
17 ChangesetError, EmptyRepositoryError, NodeAlreadyAddedError, NodeAlreadyChangedError, NodeAlreadyExistsError, NodeAlreadyRemovedError, NodeDoesNotExistError, NodeNotChangedError, RepositoryError)
17 NodeAlreadyRemovedError, NodeDoesNotExistError, NodeNotChangedError, RepositoryError)
18 from kallithea.lib.vcs.utils import author_email, author_name
18 from kallithea.lib.vcs.utils import author_email, author_name
19 from kallithea.lib.vcs.utils.helpers import get_dict_for_attrs
19 from kallithea.lib.vcs.utils.helpers import get_dict_for_attrs
20 from kallithea.lib.vcs.utils.lazy import LazyProperty
20 from kallithea.lib.vcs.utils.lazy import LazyProperty
@@ -9,8 +9,8 b' from dulwich.config import ConfigFile'
9 from kallithea.lib.vcs.backends.base import BaseChangeset, EmptyChangeset
9 from kallithea.lib.vcs.backends.base import BaseChangeset, EmptyChangeset
10 from kallithea.lib.vcs.conf import settings
10 from kallithea.lib.vcs.conf import settings
11 from kallithea.lib.vcs.exceptions import ChangesetDoesNotExistError, ChangesetError, ImproperArchiveTypeError, NodeDoesNotExistError, RepositoryError, VCSError
11 from kallithea.lib.vcs.exceptions import ChangesetDoesNotExistError, ChangesetError, ImproperArchiveTypeError, NodeDoesNotExistError, RepositoryError, VCSError
12 from kallithea.lib.vcs.nodes import (
12 from kallithea.lib.vcs.nodes import (AddedFileNodesGenerator, ChangedFileNodesGenerator, DirNode, FileNode, NodeKind, RemovedFileNodesGenerator, RootNode,
13 AddedFileNodesGenerator, ChangedFileNodesGenerator, DirNode, FileNode, NodeKind, RemovedFileNodesGenerator, RootNode, SubModuleNode)
13 SubModuleNode)
14 from kallithea.lib.vcs.utils import ascii_bytes, ascii_str, date_fromtimestamp, safe_int, safe_str
14 from kallithea.lib.vcs.utils import ascii_bytes, ascii_str, date_fromtimestamp, safe_int, safe_str
15 from kallithea.lib.vcs.utils.lazy import LazyProperty
15 from kallithea.lib.vcs.utils.lazy import LazyProperty
16
16
@@ -28,8 +28,8 b' from dulwich.repo import NotGitRepositor'
28 from kallithea.lib.vcs import subprocessio
28 from kallithea.lib.vcs import subprocessio
29 from kallithea.lib.vcs.backends.base import BaseRepository, CollectionGenerator
29 from kallithea.lib.vcs.backends.base import BaseRepository, CollectionGenerator
30 from kallithea.lib.vcs.conf import settings
30 from kallithea.lib.vcs.conf import settings
31 from kallithea.lib.vcs.exceptions import (
31 from kallithea.lib.vcs.exceptions import (BranchDoesNotExistError, ChangesetDoesNotExistError, EmptyRepositoryError, RepositoryError, TagAlreadyExistError,
32 BranchDoesNotExistError, ChangesetDoesNotExistError, EmptyRepositoryError, RepositoryError, TagAlreadyExistError, TagDoesNotExistError)
32 TagDoesNotExistError)
33 from kallithea.lib.vcs.utils import ascii_str, date_fromtimestamp, makedate, safe_bytes, safe_str
33 from kallithea.lib.vcs.utils import ascii_str, date_fromtimestamp, makedate, safe_bytes, safe_str
34 from kallithea.lib.vcs.utils.lazy import LazyProperty
34 from kallithea.lib.vcs.utils.lazy import LazyProperty
35 from kallithea.lib.vcs.utils.paths import abspath, get_user_home
35 from kallithea.lib.vcs.utils.paths import abspath, get_user_home
@@ -8,8 +8,8 b' import mercurial.obsutil'
8 from kallithea.lib.vcs.backends.base import BaseChangeset
8 from kallithea.lib.vcs.backends.base import BaseChangeset
9 from kallithea.lib.vcs.conf import settings
9 from kallithea.lib.vcs.conf import settings
10 from kallithea.lib.vcs.exceptions import ChangesetDoesNotExistError, ChangesetError, ImproperArchiveTypeError, NodeDoesNotExistError, VCSError
10 from kallithea.lib.vcs.exceptions import ChangesetDoesNotExistError, ChangesetError, ImproperArchiveTypeError, NodeDoesNotExistError, VCSError
11 from kallithea.lib.vcs.nodes import (
11 from kallithea.lib.vcs.nodes import (AddedFileNodesGenerator, ChangedFileNodesGenerator, DirNode, FileNode, NodeKind, RemovedFileNodesGenerator, RootNode,
12 AddedFileNodesGenerator, ChangedFileNodesGenerator, DirNode, FileNode, NodeKind, RemovedFileNodesGenerator, RootNode, SubModuleNode)
12 SubModuleNode)
13 from kallithea.lib.vcs.utils import ascii_bytes, ascii_str, date_fromtimestamp, safe_bytes, safe_str
13 from kallithea.lib.vcs.utils import ascii_bytes, ascii_str, date_fromtimestamp, safe_bytes, safe_str
14 from kallithea.lib.vcs.utils.lazy import LazyProperty
14 from kallithea.lib.vcs.utils.lazy import LazyProperty
15 from kallithea.lib.vcs.utils.paths import get_dirs_for_path
15 from kallithea.lib.vcs.utils.paths import get_dirs_for_path
@@ -37,8 +37,8 b' import mercurial.url'
37 import mercurial.util
37 import mercurial.util
38
38
39 from kallithea.lib.vcs.backends.base import BaseRepository, CollectionGenerator
39 from kallithea.lib.vcs.backends.base import BaseRepository, CollectionGenerator
40 from kallithea.lib.vcs.exceptions import (
40 from kallithea.lib.vcs.exceptions import (BranchDoesNotExistError, ChangesetDoesNotExistError, EmptyRepositoryError, RepositoryError, TagAlreadyExistError,
41 BranchDoesNotExistError, ChangesetDoesNotExistError, EmptyRepositoryError, RepositoryError, TagAlreadyExistError, TagDoesNotExistError, VCSError)
41 TagDoesNotExistError, VCSError)
42 from kallithea.lib.vcs.utils import ascii_str, author_email, author_name, date_fromtimestamp, makedate, safe_bytes, safe_str
42 from kallithea.lib.vcs.utils import ascii_str, author_email, author_name, date_fromtimestamp, makedate, safe_bytes, safe_str
43 from kallithea.lib.vcs.utils.lazy import LazyProperty
43 from kallithea.lib.vcs.utils.lazy import LazyProperty
44 from kallithea.lib.vcs.utils.paths import abspath
44 from kallithea.lib.vcs.utils.paths import abspath
@@ -48,8 +48,8 b' import kallithea'
48 from kallithea.lib import ext_json
48 from kallithea.lib import ext_json
49 from kallithea.lib.caching_query import FromCache
49 from kallithea.lib.caching_query import FromCache
50 from kallithea.lib.exceptions import DefaultUserException
50 from kallithea.lib.exceptions import DefaultUserException
51 from kallithea.lib.utils2 import (
51 from kallithea.lib.utils2 import (Optional, ascii_bytes, aslist, get_changeset_safe, get_clone_url, remove_prefix, safe_bytes, safe_int, safe_str, str2bool,
52 Optional, ascii_bytes, aslist, get_changeset_safe, get_clone_url, remove_prefix, safe_bytes, safe_int, safe_str, str2bool, urlreadable)
52 urlreadable)
53 from kallithea.lib.vcs import get_backend
53 from kallithea.lib.vcs import get_backend
54 from kallithea.lib.vcs.backends.base import EmptyChangeset
54 from kallithea.lib.vcs.backends.base import EmptyChangeset
55 from kallithea.lib.vcs.utils.helpers import get_scm
55 from kallithea.lib.vcs.utils.helpers import get_scm
@@ -41,8 +41,8 b' from kallithea.lib.hooks import log_dele'
41 from kallithea.lib.utils import is_valid_repo_uri, make_ui
41 from kallithea.lib.utils import is_valid_repo_uri, make_ui
42 from kallithea.lib.utils2 import LazyProperty, get_current_authuser, obfuscate_url_pw, remove_prefix
42 from kallithea.lib.utils2 import LazyProperty, get_current_authuser, obfuscate_url_pw, remove_prefix
43 from kallithea.lib.vcs.backends import get_backend
43 from kallithea.lib.vcs.backends import get_backend
44 from kallithea.model.db import (
44 from kallithea.model.db import (Permission, RepoGroup, Repository, RepositoryField, Session, Statistics, Ui, User, UserGroup, UserGroupRepoGroupToPerm,
45 Permission, RepoGroup, Repository, RepositoryField, Session, Statistics, Ui, User, UserGroup, UserGroupRepoGroupToPerm, UserGroupRepoToPerm, UserRepoGroupToPerm, UserRepoToPerm)
45 UserGroupRepoToPerm, UserRepoGroupToPerm, UserRepoToPerm)
46
46
47
47
48 log = logging.getLogger(__name__)
48 log = logging.getLogger(__name__)
@@ -28,8 +28,8 b' import logging'
28 import traceback
28 import traceback
29
29
30 from kallithea.lib.exceptions import RepoGroupAssignmentError, UserGroupsAssignedException
30 from kallithea.lib.exceptions import RepoGroupAssignmentError, UserGroupsAssignedException
31 from kallithea.model.db import (
31 from kallithea.model.db import (Permission, Session, User, UserGroup, UserGroupMember, UserGroupRepoToPerm, UserGroupToPerm, UserGroupUserGroupToPerm,
32 Permission, Session, User, UserGroup, UserGroupMember, UserGroupRepoToPerm, UserGroupToPerm, UserGroupUserGroupToPerm, UserUserGroupToPerm)
32 UserUserGroupToPerm)
33
33
34
34
35 log = logging.getLogger(__name__)
35 log = logging.getLogger(__name__)
@@ -41,8 +41,8 b' from kallithea.model.repo_group import R'
41 from kallithea.model.scm import ScmModel
41 from kallithea.model.scm import ScmModel
42 from kallithea.model.user import UserModel
42 from kallithea.model.user import UserModel
43 from kallithea.model.user_group import UserGroupModel
43 from kallithea.model.user_group import UserGroupModel
44 from kallithea.tests.base import (
44 from kallithea.tests.base import (GIT_REPO, HG_REPO, IP_ADDR, TEST_USER_ADMIN_EMAIL, TEST_USER_ADMIN_LOGIN, TEST_USER_REGULAR_LOGIN, TESTS_TMP_PATH,
45 GIT_REPO, HG_REPO, IP_ADDR, TEST_USER_ADMIN_EMAIL, TEST_USER_ADMIN_LOGIN, TEST_USER_REGULAR_LOGIN, TESTS_TMP_PATH, invalidate_all_caches)
45 invalidate_all_caches)
46
46
47
47
48 log = logging.getLogger(__name__)
48 log = logging.getLogger(__name__)
@@ -7,8 +7,8 b' import uuid'
7 # Retrieve the necessary configuration options from the test base
7 # Retrieve the necessary configuration options from the test base
8 # module. Some of these configuration options are subsequently
8 # module. Some of these configuration options are subsequently
9 # consumed by the VCS test module.
9 # consumed by the VCS test module.
10 from kallithea.tests.base import (
10 from kallithea.tests.base import (GIT_REMOTE_REPO, HG_REMOTE_REPO, TEST_GIT_REPO, TEST_GIT_REPO_CLONE, TEST_HG_REPO, TEST_HG_REPO_CLONE, TEST_HG_REPO_PULL,
11 GIT_REMOTE_REPO, HG_REMOTE_REPO, TEST_GIT_REPO, TEST_GIT_REPO_CLONE, TEST_HG_REPO, TEST_HG_REPO_CLONE, TEST_HG_REPO_PULL, TESTS_TMP_PATH)
11 TESTS_TMP_PATH)
12
12
13
13
14 __all__ = (
14 __all__ = (
@@ -7,8 +7,8 b' import datetime'
7
7
8 import pytest
8 import pytest
9
9
10 from kallithea.lib.vcs.exceptions import (
10 from kallithea.lib.vcs.exceptions import (EmptyRepositoryError, NodeAlreadyAddedError, NodeAlreadyChangedError, NodeAlreadyExistsError, NodeAlreadyRemovedError,
11 EmptyRepositoryError, NodeAlreadyAddedError, NodeAlreadyChangedError, NodeAlreadyExistsError, NodeAlreadyRemovedError, NodeDoesNotExistError, NodeNotChangedError)
11 NodeDoesNotExistError, NodeNotChangedError)
12 from kallithea.lib.vcs.nodes import DirNode, FileNode
12 from kallithea.lib.vcs.nodes import DirNode, FileNode
13 from kallithea.tests.vcs.base import _BackendTestMixin
13 from kallithea.tests.vcs.base import _BackendTestMixin
14
14
@@ -18,6 +18,6 b' hg mani | xargs chmod -x'
18 hg loc 'set:!binary()&grep("^#!")&!(**_tmpl.py)&!(**/template**)' | xargs chmod +x
18 hg loc 'set:!binary()&grep("^#!")&!(**_tmpl.py)&!(**/template**)' | xargs chmod +x
19
19
20 # isort is installed from dev_requirements.txt
20 # isort is installed from dev_requirements.txt
21 hg loc 'set:!binary()&grep("^#!.*python")' '*.py' | xargs isort --line-width 160 --wrap-length 160 --lines-after-imports 2
21 hg loc 'set:!binary()&grep("^#!.*python")' '*.py' | xargs isort --line-width 160 --lines-after-imports 2
22
22
23 hg diff
23 hg diff
General Comments 0
You need to be logged in to leave comments. Login now