diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 556a186f0..4d8e74170 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -32,3 +32,5 @@ jobs:
run: tox -e pep8
- name: Run mypy static typing checker (http://mypy-lang.org/)
run: tox -e mypy
+ - name: Run isort import order checker (https://pycqa.github.io/isort/)
+ run: tox -e isort -- --check
diff --git a/gitlab/__init__.py b/gitlab/__init__.py
index 4d3ebfb3a..7b79f2265 100644
--- a/gitlab/__init__.py
+++ b/gitlab/__init__.py
@@ -31,5 +31,4 @@
from gitlab.const import * # noqa: F401,F403
from gitlab.exceptions import * # noqa: F401,F403
-
warnings.filterwarnings("default", category=DeprecationWarning, module="^gitlab")
diff --git a/gitlab/__main__.py b/gitlab/__main__.py
index b25cb4932..e1a914c6d 100644
--- a/gitlab/__main__.py
+++ b/gitlab/__main__.py
@@ -1,5 +1,4 @@
import gitlab.cli
-
if __name__ == "__main__":
gitlab.cli.main()
diff --git a/gitlab/base.py b/gitlab/base.py
index c81c6d981..689b68cf6 100644
--- a/gitlab/base.py
+++ b/gitlab/base.py
@@ -19,9 +19,10 @@
from types import ModuleType
from typing import Any, Dict, Iterable, NamedTuple, Optional, Tuple, Type
-from .client import Gitlab, GitlabList
from gitlab import types as g_types
+from .client import Gitlab, GitlabList
+
__all__ = [
"RequiredOptional",
"RESTObject",
diff --git a/gitlab/cli.py b/gitlab/cli.py
index 0ee599449..7ae31377b 100644
--- a/gitlab/cli.py
+++ b/gitlab/cli.py
@@ -28,7 +28,6 @@
import gitlab.config
from gitlab.base import RESTObject
-
# This regex is based on:
# https://github.com/jpvanhal/inflection/blob/master/inflection/__init__.py
camel_upperlower_regex = re.compile(r"([A-Z]+)([A-Z][a-z])")
diff --git a/gitlab/client.py b/gitlab/client.py
index 1fcda1e82..fa9a394f3 100644
--- a/gitlab/client.py
+++ b/gitlab/client.py
@@ -17,17 +17,16 @@
"""Wrapper for the GitLab API."""
import time
-from typing import cast, Any, Dict, List, Optional, Tuple, TYPE_CHECKING, Union
+from typing import Any, cast, Dict, List, Optional, Tuple, TYPE_CHECKING, Union
import requests
import requests.utils
+from requests_toolbelt.multipart.encoder import MultipartEncoder # type: ignore
import gitlab.config
import gitlab.const
import gitlab.exceptions
from gitlab import utils
-from requests_toolbelt.multipart.encoder import MultipartEncoder # type: ignore
-
REDIRECT_MSG = (
"python-gitlab detected an http to https redirection. You "
@@ -385,7 +384,6 @@ def _set_auth_info(self) -> None:
def enable_debug(self) -> None:
import logging
-
from http.client import HTTPConnection # noqa
HTTPConnection.debuglevel = 1 # type: ignore
diff --git a/gitlab/config.py b/gitlab/config.py
index d2a05df9b..9363b6487 100644
--- a/gitlab/config.py
+++ b/gitlab/config.py
@@ -15,12 +15,12 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see .
-import os
import configparser
+import os
import shlex
import subprocess
-from typing import List, Optional, Union
from os.path import expanduser, expandvars
+from typing import List, Optional, Union
from gitlab.const import USER_AGENT
diff --git a/gitlab/const.py b/gitlab/const.py
index e006285f8..33687c121 100644
--- a/gitlab/const.py
+++ b/gitlab/const.py
@@ -17,7 +17,6 @@
from gitlab.__version__ import __title__, __version__
-
NO_ACCESS: int = 0
MINIMAL_ACCESS: int = 5
GUEST_ACCESS: int = 10
diff --git a/gitlab/exceptions.py b/gitlab/exceptions.py
index 77a74927b..6f2d4c4ae 100644
--- a/gitlab/exceptions.py
+++ b/gitlab/exceptions.py
@@ -16,7 +16,7 @@
# along with this program. If not, see .
import functools
-from typing import Any, Callable, cast, Optional, Type, TypeVar, TYPE_CHECKING, Union
+from typing import Any, Callable, cast, Optional, Type, TYPE_CHECKING, TypeVar, Union
class GitlabError(Exception):
diff --git a/gitlab/mixins.py b/gitlab/mixins.py
index a4ed9f593..852bc634c 100644
--- a/gitlab/mixins.py
+++ b/gitlab/mixins.py
@@ -15,6 +15,7 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see .
+import warnings
from types import ModuleType
from typing import (
Any,
@@ -31,12 +32,10 @@
import requests
import gitlab
-from gitlab import base
-from gitlab import cli
+from gitlab import base, cli
from gitlab import exceptions as exc
from gitlab import types as g_types
from gitlab import utils
-import warnings
__all__ = [
"GetMixin",
diff --git a/gitlab/tests/conftest.py b/gitlab/tests/conftest.py
index 74fb858fa..64df0517a 100644
--- a/gitlab/tests/conftest.py
+++ b/gitlab/tests/conftest.py
@@ -1,4 +1,5 @@
import pytest
+
import gitlab
diff --git a/gitlab/tests/mixins/test_meta_mixins.py b/gitlab/tests/mixins/test_meta_mixins.py
index 025e9f419..4c8845b69 100644
--- a/gitlab/tests/mixins/test_meta_mixins.py
+++ b/gitlab/tests/mixins/test_meta_mixins.py
@@ -5,8 +5,8 @@
GetMixin,
ListMixin,
NoUpdateMixin,
- UpdateMixin,
RetrieveMixin,
+ UpdateMixin,
)
diff --git a/gitlab/tests/mixins/test_mixin_methods.py b/gitlab/tests/mixins/test_mixin_methods.py
index fbc16a9bb..626230e1c 100644
--- a/gitlab/tests/mixins/test_mixin_methods.py
+++ b/gitlab/tests/mixins/test_mixin_methods.py
@@ -1,5 +1,4 @@
import pytest
-
from httmock import HTTMock, response, urlmatch # noqa
from gitlab import base
diff --git a/gitlab/tests/objects/test_appearance.py b/gitlab/tests/objects/test_appearance.py
index 43ea57440..0de65244d 100644
--- a/gitlab/tests/objects/test_appearance.py
+++ b/gitlab/tests/objects/test_appearance.py
@@ -5,7 +5,6 @@
import pytest
import responses
-
title = "GitLab Test Instance"
description = "gitlab-test.example.com"
new_title = "new-title"
diff --git a/gitlab/tests/objects/test_applications.py b/gitlab/tests/objects/test_applications.py
index f8b5d88c9..61de0199f 100644
--- a/gitlab/tests/objects/test_applications.py
+++ b/gitlab/tests/objects/test_applications.py
@@ -5,7 +5,6 @@
import pytest
import responses
-
title = "GitLab Test Instance"
description = "gitlab-test.example.com"
new_title = "new-title"
diff --git a/gitlab/tests/objects/test_badges.py b/gitlab/tests/objects/test_badges.py
index c9281eadb..e2266843b 100644
--- a/gitlab/tests/objects/test_badges.py
+++ b/gitlab/tests/objects/test_badges.py
@@ -7,7 +7,7 @@
import pytest
import responses
-from gitlab.v4.objects import ProjectBadge, GroupBadge
+from gitlab.v4.objects import GroupBadge, ProjectBadge
link_url = (
"http://example.com/ci_status.svg?project=example-org/example-project&ref=master"
diff --git a/gitlab/tests/objects/test_deploy_tokens.py b/gitlab/tests/objects/test_deploy_tokens.py
index 9cfa59860..66a79fa1d 100644
--- a/gitlab/tests/objects/test_deploy_tokens.py
+++ b/gitlab/tests/objects/test_deploy_tokens.py
@@ -6,7 +6,6 @@
from gitlab.v4.objects import ProjectDeployToken
-
create_content = {
"id": 1,
"name": "test_deploy_token",
diff --git a/gitlab/tests/objects/test_job_artifacts.py b/gitlab/tests/objects/test_job_artifacts.py
index c441b4b12..7c5f1dfea 100644
--- a/gitlab/tests/objects/test_job_artifacts.py
+++ b/gitlab/tests/objects/test_job_artifacts.py
@@ -5,7 +5,6 @@
import pytest
import responses
-
ref_name = "master"
job = "build"
diff --git a/gitlab/tests/objects/test_jobs.py b/gitlab/tests/objects/test_jobs.py
index ff468ef51..104d59daa 100644
--- a/gitlab/tests/objects/test_jobs.py
+++ b/gitlab/tests/objects/test_jobs.py
@@ -6,7 +6,6 @@
from gitlab.v4.objects import ProjectJob
-
job_content = {
"commit": {
"author_email": "admin@example.com",
diff --git a/gitlab/tests/objects/test_packages.py b/gitlab/tests/objects/test_packages.py
index 200a3e1b2..672eee01d 100644
--- a/gitlab/tests/objects/test_packages.py
+++ b/gitlab/tests/objects/test_packages.py
@@ -8,7 +8,6 @@
from gitlab.v4.objects import GroupPackage, ProjectPackage, ProjectPackageFile
-
package_content = {
"id": 1,
"name": "com/mycompany/my-app",
diff --git a/gitlab/tests/objects/test_pipelines.py b/gitlab/tests/objects/test_pipelines.py
index f54aa7d69..d47429636 100644
--- a/gitlab/tests/objects/test_pipelines.py
+++ b/gitlab/tests/objects/test_pipelines.py
@@ -6,7 +6,6 @@
from gitlab.v4.objects import ProjectPipeline
-
pipeline_content = {
"id": 46,
"project_id": 1,
diff --git a/gitlab/tests/objects/test_project_merge_request_approvals.py b/gitlab/tests/objects/test_project_merge_request_approvals.py
index d8ed3a8ea..16d58bd01 100644
--- a/gitlab/tests/objects/test_project_merge_request_approvals.py
+++ b/gitlab/tests/objects/test_project_merge_request_approvals.py
@@ -9,7 +9,6 @@
import gitlab
-
approval_rule_id = 1
approval_rule_name = "security"
approvals_required = 3
diff --git a/gitlab/tests/objects/test_projects.py b/gitlab/tests/objects/test_projects.py
index 14ab96651..73e119bd3 100644
--- a/gitlab/tests/objects/test_projects.py
+++ b/gitlab/tests/objects/test_projects.py
@@ -7,7 +7,6 @@
from gitlab.v4.objects import Project
-
project_content = {"name": "name", "id": 1}
import_content = {
"id": 1,
diff --git a/gitlab/tests/objects/test_resource_label_events.py b/gitlab/tests/objects/test_resource_label_events.py
index 07f891c38..deea8a0bb 100644
--- a/gitlab/tests/objects/test_resource_label_events.py
+++ b/gitlab/tests/objects/test_resource_label_events.py
@@ -6,9 +6,9 @@
import responses
from gitlab.v4.objects import (
+ GroupEpicResourceLabelEvent,
ProjectIssueResourceLabelEvent,
ProjectMergeRequestResourceLabelEvent,
- GroupEpicResourceLabelEvent,
)
diff --git a/gitlab/tests/objects/test_resource_state_events.py b/gitlab/tests/objects/test_resource_state_events.py
index 01c18870f..bf1819331 100644
--- a/gitlab/tests/objects/test_resource_state_events.py
+++ b/gitlab/tests/objects/test_resource_state_events.py
@@ -10,7 +10,6 @@
ProjectMergeRequestResourceStateEvent,
)
-
issue_event_content = {"id": 1, "resource_type": "Issue"}
mr_event_content = {"id": 1, "resource_type": "MergeRequest"}
diff --git a/gitlab/tests/objects/test_runners.py b/gitlab/tests/objects/test_runners.py
index 7185c26ad..686eec211 100644
--- a/gitlab/tests/objects/test_runners.py
+++ b/gitlab/tests/objects/test_runners.py
@@ -5,7 +5,6 @@
import gitlab
-
runner_detail = {
"active": True,
"architecture": "amd64",
diff --git a/gitlab/tests/objects/test_snippets.py b/gitlab/tests/objects/test_snippets.py
index 7e8afc2f0..2540fc3c4 100644
--- a/gitlab/tests/objects/test_snippets.py
+++ b/gitlab/tests/objects/test_snippets.py
@@ -6,7 +6,6 @@
import pytest
import responses
-
title = "Example Snippet Title"
visibility = "private"
new_title = "new-title"
diff --git a/gitlab/tests/objects/test_todos.py b/gitlab/tests/objects/test_todos.py
index 07bb6803c..058fe3364 100644
--- a/gitlab/tests/objects/test_todos.py
+++ b/gitlab/tests/objects/test_todos.py
@@ -10,7 +10,6 @@
from gitlab.v4.objects import Todo
-
with open(os.path.dirname(__file__) + "/../data/todo.json", "r") as json_file:
todo_content = json_file.read()
json_content = json.loads(todo_content)
diff --git a/gitlab/tests/objects/test_variables.py b/gitlab/tests/objects/test_variables.py
index d79bf96c3..fae37a864 100644
--- a/gitlab/tests/objects/test_variables.py
+++ b/gitlab/tests/objects/test_variables.py
@@ -12,7 +12,6 @@
from gitlab.v4.objects import GroupVariable, ProjectVariable, Variable
-
key = "TEST_VARIABLE_1"
value = "TEST_1"
new_value = "TEST_2"
diff --git a/gitlab/tests/test_base.py b/gitlab/tests/test_base.py
index 1c811cf7c..b3a58fcf7 100644
--- a/gitlab/tests/test_base.py
+++ b/gitlab/tests/test_base.py
@@ -17,9 +17,10 @@
import pickle
-from gitlab import base
import pytest
+from gitlab import base
+
class FakeGitlab(object):
pass
diff --git a/gitlab/tests/test_cli.py b/gitlab/tests/test_cli.py
index b7fd369dd..a9ca9582b 100644
--- a/gitlab/tests/test_cli.py
+++ b/gitlab/tests/test_cli.py
@@ -17,10 +17,9 @@
# along with this program. If not, see .
import argparse
+import io
import os
import tempfile
-import io
-
from contextlib import redirect_stderr # noqa: H302
import pytest
diff --git a/gitlab/tests/test_config.py b/gitlab/tests/test_config.py
index 18b54c8bb..cd61b8d4a 100644
--- a/gitlab/tests/test_config.py
+++ b/gitlab/tests/test_config.py
@@ -15,15 +15,14 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see .
+import io
import os
from textwrap import dedent
import mock
-import io
-
-from gitlab import config, USER_AGENT
import pytest
+from gitlab import config, USER_AGENT
custom_user_agent = "my-package/1.0.0"
diff --git a/gitlab/tests/test_gitlab.py b/gitlab/tests/test_gitlab.py
index 127b2c1d0..acb8752ff 100644
--- a/gitlab/tests/test_gitlab.py
+++ b/gitlab/tests/test_gitlab.py
@@ -24,7 +24,6 @@
from gitlab import Gitlab, GitlabList, USER_AGENT
from gitlab.v4.objects import CurrentUser
-
username = "username"
user_id = 1
diff --git a/gitlab/tests/test_gitlab_http_methods.py b/gitlab/tests/test_gitlab_http_methods.py
index 020fabf23..f1bc9cd84 100644
--- a/gitlab/tests/test_gitlab_http_methods.py
+++ b/gitlab/tests/test_gitlab_http_methods.py
@@ -1,7 +1,6 @@
import pytest
import requests
-
-from httmock import HTTMock, urlmatch, response
+from httmock import HTTMock, response, urlmatch
from gitlab import GitlabHttpError, GitlabList, GitlabParsingError
diff --git a/gitlab/v4/cli.py b/gitlab/v4/cli.py
index a84a6a910..342eb6fa3 100644
--- a/gitlab/v4/cli.py
+++ b/gitlab/v4/cli.py
@@ -22,8 +22,8 @@
import gitlab
import gitlab.base
-from gitlab import cli
import gitlab.v4.objects
+from gitlab import cli
class GitlabCLI(object):
diff --git a/gitlab/v4/objects/__init__.py b/gitlab/v4/objects/__init__.py
index ac9f861a3..3317396ec 100644
--- a/gitlab/v4/objects/__init__.py
+++ b/gitlab/v4/objects/__init__.py
@@ -29,8 +29,8 @@
from .container_registry import *
from .custom_attributes import *
from .deploy_keys import *
-from .deployments import *
from .deploy_tokens import *
+from .deployments import *
from .discussions import *
from .environments import *
from .epics import *
@@ -54,6 +54,7 @@
from .notification_settings import *
from .packages import *
from .pages import *
+from .personal_access_tokens import *
from .pipelines import *
from .projects import *
from .push_rules import *
@@ -71,8 +72,6 @@
from .users import *
from .variables import *
from .wikis import *
-from .personal_access_tokens import *
-
# TODO: deprecate these in favor of gitlab.const.*
VISIBILITY_PRIVATE = "private"
diff --git a/gitlab/v4/objects/access_requests.py b/gitlab/v4/objects/access_requests.py
index 7eef47527..4e3328a00 100644
--- a/gitlab/v4/objects/access_requests.py
+++ b/gitlab/v4/objects/access_requests.py
@@ -7,7 +7,6 @@
ObjectDeleteMixin,
)
-
__all__ = [
"GroupAccessRequest",
"GroupAccessRequestManager",
diff --git a/gitlab/v4/objects/appearance.py b/gitlab/v4/objects/appearance.py
index 9d81ad6f3..a34398e40 100644
--- a/gitlab/v4/objects/appearance.py
+++ b/gitlab/v4/objects/appearance.py
@@ -2,7 +2,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import GetWithoutIdMixin, SaveMixin, UpdateMixin
-
__all__ = [
"ApplicationAppearance",
"ApplicationAppearanceManager",
diff --git a/gitlab/v4/objects/award_emojis.py b/gitlab/v4/objects/award_emojis.py
index 1070fc75b..1a7aecd5c 100644
--- a/gitlab/v4/objects/award_emojis.py
+++ b/gitlab/v4/objects/award_emojis.py
@@ -1,7 +1,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import NoUpdateMixin, ObjectDeleteMixin
-
__all__ = [
"ProjectIssueAwardEmoji",
"ProjectIssueAwardEmojiManager",
diff --git a/gitlab/v4/objects/badges.py b/gitlab/v4/objects/badges.py
index ba1d41fd2..198f6ea8e 100644
--- a/gitlab/v4/objects/badges.py
+++ b/gitlab/v4/objects/badges.py
@@ -1,7 +1,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import BadgeRenderMixin, CRUDMixin, ObjectDeleteMixin, SaveMixin
-
__all__ = [
"GroupBadge",
"GroupBadgeManager",
diff --git a/gitlab/v4/objects/boards.py b/gitlab/v4/objects/boards.py
index cf36af1b3..b517fde6f 100644
--- a/gitlab/v4/objects/boards.py
+++ b/gitlab/v4/objects/boards.py
@@ -1,7 +1,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CRUDMixin, ObjectDeleteMixin, SaveMixin
-
__all__ = [
"GroupBoardList",
"GroupBoardListManager",
diff --git a/gitlab/v4/objects/branches.py b/gitlab/v4/objects/branches.py
index 6b1b27f3e..3738657a0 100644
--- a/gitlab/v4/objects/branches.py
+++ b/gitlab/v4/objects/branches.py
@@ -3,7 +3,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import NoUpdateMixin, ObjectDeleteMixin
-
__all__ = [
"ProjectBranch",
"ProjectBranchManager",
diff --git a/gitlab/v4/objects/broadcast_messages.py b/gitlab/v4/objects/broadcast_messages.py
index d6de53fa0..7784997a4 100644
--- a/gitlab/v4/objects/broadcast_messages.py
+++ b/gitlab/v4/objects/broadcast_messages.py
@@ -1,7 +1,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CRUDMixin, ObjectDeleteMixin, SaveMixin
-
__all__ = [
"BroadcastMessage",
"BroadcastMessageManager",
diff --git a/gitlab/v4/objects/clusters.py b/gitlab/v4/objects/clusters.py
index 50b3fa3a8..10ff2029f 100644
--- a/gitlab/v4/objects/clusters.py
+++ b/gitlab/v4/objects/clusters.py
@@ -1,7 +1,6 @@
from gitlab import exceptions as exc
from gitlab.base import RequiredOptional, RESTManager, RESTObject
-from gitlab.mixins import CRUDMixin, CreateMixin, ObjectDeleteMixin, SaveMixin
-
+from gitlab.mixins import CreateMixin, CRUDMixin, ObjectDeleteMixin, SaveMixin
__all__ = [
"GroupCluster",
diff --git a/gitlab/v4/objects/commits.py b/gitlab/v4/objects/commits.py
index 6176a0811..76e582b31 100644
--- a/gitlab/v4/objects/commits.py
+++ b/gitlab/v4/objects/commits.py
@@ -2,8 +2,8 @@
from gitlab import exceptions as exc
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CreateMixin, ListMixin, RefreshMixin, RetrieveMixin
-from .discussions import ProjectCommitDiscussionManager # noqa: F401
+from .discussions import ProjectCommitDiscussionManager # noqa: F401
__all__ = [
"ProjectCommit",
diff --git a/gitlab/v4/objects/container_registry.py b/gitlab/v4/objects/container_registry.py
index 99bc7d2a6..f144c42be 100644
--- a/gitlab/v4/objects/container_registry.py
+++ b/gitlab/v4/objects/container_registry.py
@@ -3,7 +3,6 @@
from gitlab.base import RESTManager, RESTObject
from gitlab.mixins import DeleteMixin, ListMixin, ObjectDeleteMixin, RetrieveMixin
-
__all__ = [
"ProjectRegistryRepository",
"ProjectRegistryRepositoryManager",
diff --git a/gitlab/v4/objects/custom_attributes.py b/gitlab/v4/objects/custom_attributes.py
index a4e979527..48296caf8 100644
--- a/gitlab/v4/objects/custom_attributes.py
+++ b/gitlab/v4/objects/custom_attributes.py
@@ -1,7 +1,6 @@
from gitlab.base import RESTManager, RESTObject
from gitlab.mixins import DeleteMixin, ObjectDeleteMixin, RetrieveMixin, SetMixin
-
__all__ = [
"GroupCustomAttribute",
"GroupCustomAttributeManager",
diff --git a/gitlab/v4/objects/deploy_keys.py b/gitlab/v4/objects/deploy_keys.py
index 9c3dbfd5f..cf0507d1a 100644
--- a/gitlab/v4/objects/deploy_keys.py
+++ b/gitlab/v4/objects/deploy_keys.py
@@ -3,7 +3,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CRUDMixin, ListMixin, ObjectDeleteMixin, SaveMixin
-
__all__ = [
"DeployKey",
"DeployKeyManager",
diff --git a/gitlab/v4/objects/deploy_tokens.py b/gitlab/v4/objects/deploy_tokens.py
index c7476641e..c6ba0d63f 100644
--- a/gitlab/v4/objects/deploy_tokens.py
+++ b/gitlab/v4/objects/deploy_tokens.py
@@ -2,7 +2,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CreateMixin, DeleteMixin, ListMixin, ObjectDeleteMixin
-
__all__ = [
"DeployToken",
"DeployTokenManager",
diff --git a/gitlab/v4/objects/deployments.py b/gitlab/v4/objects/deployments.py
index 64d779f26..dea8caf12 100644
--- a/gitlab/v4/objects/deployments.py
+++ b/gitlab/v4/objects/deployments.py
@@ -1,7 +1,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CreateMixin, RetrieveMixin, SaveMixin, UpdateMixin
-
__all__ = [
"ProjectDeployment",
"ProjectDeploymentManager",
diff --git a/gitlab/v4/objects/discussions.py b/gitlab/v4/objects/discussions.py
index 2209185f7..f91d8fb65 100644
--- a/gitlab/v4/objects/discussions.py
+++ b/gitlab/v4/objects/discussions.py
@@ -1,5 +1,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CreateMixin, RetrieveMixin, SaveMixin, UpdateMixin
+
from .notes import ( # noqa: F401
ProjectCommitDiscussionNoteManager,
ProjectIssueDiscussionNoteManager,
@@ -7,7 +8,6 @@
ProjectSnippetDiscussionNoteManager,
)
-
__all__ = [
"ProjectCommitDiscussion",
"ProjectCommitDiscussionManager",
diff --git a/gitlab/v4/objects/environments.py b/gitlab/v4/objects/environments.py
index f5409270b..e318da859 100644
--- a/gitlab/v4/objects/environments.py
+++ b/gitlab/v4/objects/environments.py
@@ -10,7 +10,6 @@
UpdateMixin,
)
-
__all__ = [
"ProjectEnvironment",
"ProjectEnvironmentManager",
diff --git a/gitlab/v4/objects/epics.py b/gitlab/v4/objects/epics.py
index 023d0a606..4311aa773 100644
--- a/gitlab/v4/objects/epics.py
+++ b/gitlab/v4/objects/epics.py
@@ -1,17 +1,17 @@
-from gitlab import types
from gitlab import exceptions as exc
+from gitlab import types
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import (
- CRUDMixin,
CreateMixin,
+ CRUDMixin,
DeleteMixin,
ListMixin,
ObjectDeleteMixin,
SaveMixin,
UpdateMixin,
)
-from .events import GroupEpicResourceLabelEventManager # noqa: F401
+from .events import GroupEpicResourceLabelEventManager # noqa: F401
__all__ = [
"GroupEpic",
diff --git a/gitlab/v4/objects/events.py b/gitlab/v4/objects/events.py
index f57d02eb4..8772e8d90 100644
--- a/gitlab/v4/objects/events.py
+++ b/gitlab/v4/objects/events.py
@@ -1,7 +1,6 @@
from gitlab.base import RESTManager, RESTObject
from gitlab.mixins import ListMixin, RetrieveMixin
-
__all__ = [
"Event",
"EventManager",
diff --git a/gitlab/v4/objects/export_import.py b/gitlab/v4/objects/export_import.py
index 050874bda..ec4532ac3 100644
--- a/gitlab/v4/objects/export_import.py
+++ b/gitlab/v4/objects/export_import.py
@@ -1,7 +1,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CreateMixin, DownloadMixin, GetWithoutIdMixin, RefreshMixin
-
__all__ = [
"GroupExport",
"GroupExportManager",
diff --git a/gitlab/v4/objects/features.py b/gitlab/v4/objects/features.py
index d96615e95..93ac95045 100644
--- a/gitlab/v4/objects/features.py
+++ b/gitlab/v4/objects/features.py
@@ -1,9 +1,8 @@
-from gitlab import utils
from gitlab import exceptions as exc
+from gitlab import utils
from gitlab.base import RESTManager, RESTObject
from gitlab.mixins import DeleteMixin, ListMixin, ObjectDeleteMixin
-
__all__ = [
"Feature",
"FeatureManager",
diff --git a/gitlab/v4/objects/files.py b/gitlab/v4/objects/files.py
index 5d0401f5d..ff4547860 100644
--- a/gitlab/v4/objects/files.py
+++ b/gitlab/v4/objects/files.py
@@ -1,6 +1,8 @@
import base64
-from gitlab import cli, utils
+
+from gitlab import cli
from gitlab import exceptions as exc
+from gitlab import utils
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import (
CreateMixin,
@@ -11,7 +13,6 @@
UpdateMixin,
)
-
__all__ = [
"ProjectFile",
"ProjectFileManager",
diff --git a/gitlab/v4/objects/geo_nodes.py b/gitlab/v4/objects/geo_nodes.py
index 3aaffd7c6..16fc783f7 100644
--- a/gitlab/v4/objects/geo_nodes.py
+++ b/gitlab/v4/objects/geo_nodes.py
@@ -9,7 +9,6 @@
UpdateMixin,
)
-
__all__ = [
"GeoNode",
"GeoNodeManager",
diff --git a/gitlab/v4/objects/groups.py b/gitlab/v4/objects/groups.py
index 574c57b50..8c1b68185 100644
--- a/gitlab/v4/objects/groups.py
+++ b/gitlab/v4/objects/groups.py
@@ -1,17 +1,21 @@
-from gitlab import cli, types
+from gitlab import cli
from gitlab import exceptions as exc
+from gitlab import types
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CRUDMixin, ListMixin, ObjectDeleteMixin, SaveMixin
+
from .access_requests import GroupAccessRequestManager # noqa: F401
from .audit_events import GroupAuditEventManager # noqa: F401
from .badges import GroupBadgeManager # noqa: F401
from .boards import GroupBoardManager # noqa: F401
+from .clusters import GroupClusterManager # noqa: F401
from .custom_attributes import GroupCustomAttributeManager # noqa: F401
-from .export_import import GroupExportManager, GroupImportManager # noqa: F401
+from .deploy_tokens import GroupDeployTokenManager # noqa: F401
from .epics import GroupEpicManager # noqa: F401
+from .export_import import GroupExportManager, GroupImportManager # noqa: F401
from .issues import GroupIssueManager # noqa: F401
from .labels import GroupLabelManager # noqa: F401
-from .members import GroupMemberManager, GroupMemberAllManager # noqa: F401
+from .members import GroupMemberAllManager, GroupMemberManager # noqa: F401
from .merge_requests import GroupMergeRequestManager # noqa: F401
from .milestones import GroupMilestoneManager # noqa: F401
from .notification_settings import GroupNotificationSettingsManager # noqa: F401
@@ -19,9 +23,6 @@
from .projects import GroupProjectManager # noqa: F401
from .runners import GroupRunnerManager # noqa: F401
from .variables import GroupVariableManager # noqa: F401
-from .clusters import GroupClusterManager # noqa: F401
-from .deploy_tokens import GroupDeployTokenManager # noqa: F401
-
__all__ = [
"Group",
diff --git a/gitlab/v4/objects/hooks.py b/gitlab/v4/objects/hooks.py
index b0eab0782..69b324e8c 100644
--- a/gitlab/v4/objects/hooks.py
+++ b/gitlab/v4/objects/hooks.py
@@ -1,7 +1,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CRUDMixin, NoUpdateMixin, ObjectDeleteMixin, SaveMixin
-
__all__ = [
"Hook",
"HookManager",
diff --git a/gitlab/v4/objects/issues.py b/gitlab/v4/objects/issues.py
index bf0e76604..c77a8d509 100644
--- a/gitlab/v4/objects/issues.py
+++ b/gitlab/v4/objects/issues.py
@@ -1,9 +1,10 @@
-from gitlab import cli, types
+from gitlab import cli
from gitlab import exceptions as exc
+from gitlab import types
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import (
- CRUDMixin,
CreateMixin,
+ CRUDMixin,
DeleteMixin,
ListMixin,
ObjectDeleteMixin,
@@ -15,6 +16,7 @@
TodoMixin,
UserAgentDetailMixin,
)
+
from .award_emojis import ProjectIssueAwardEmojiManager # noqa: F401
from .discussions import ProjectIssueDiscussionManager # noqa: F401
from .events import ( # noqa: F401
@@ -24,7 +26,6 @@
)
from .notes import ProjectIssueNoteManager # noqa: F401
-
__all__ = [
"Issue",
"IssueManager",
diff --git a/gitlab/v4/objects/jobs.py b/gitlab/v4/objects/jobs.py
index 6274f162c..2e7693d5b 100644
--- a/gitlab/v4/objects/jobs.py
+++ b/gitlab/v4/objects/jobs.py
@@ -1,9 +1,9 @@
-from gitlab import cli, utils
+from gitlab import cli
from gitlab import exceptions as exc
+from gitlab import utils
from gitlab.base import RESTManager, RESTObject
from gitlab.mixins import RefreshMixin, RetrieveMixin
-
__all__ = [
"ProjectJob",
"ProjectJobManager",
diff --git a/gitlab/v4/objects/labels.py b/gitlab/v4/objects/labels.py
index 682c64f01..544c3cd90 100644
--- a/gitlab/v4/objects/labels.py
+++ b/gitlab/v4/objects/labels.py
@@ -11,7 +11,6 @@
UpdateMixin,
)
-
__all__ = [
"GroupLabel",
"GroupLabelManager",
diff --git a/gitlab/v4/objects/ldap.py b/gitlab/v4/objects/ldap.py
index 72c8e7f39..e0202a188 100644
--- a/gitlab/v4/objects/ldap.py
+++ b/gitlab/v4/objects/ldap.py
@@ -1,7 +1,6 @@
from gitlab import exceptions as exc
from gitlab.base import RESTManager, RESTObject, RESTObjectList
-
__all__ = [
"LDAPGroup",
"LDAPGroupManager",
diff --git a/gitlab/v4/objects/members.py b/gitlab/v4/objects/members.py
index 839c89ef8..a64df24ac 100644
--- a/gitlab/v4/objects/members.py
+++ b/gitlab/v4/objects/members.py
@@ -2,10 +2,10 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import (
CRUDMixin,
+ MemberAllMixin,
ObjectDeleteMixin,
- SaveMixin,
RetrieveMixin,
- MemberAllMixin,
+ SaveMixin,
)
__all__ = [
diff --git a/gitlab/v4/objects/merge_request_approvals.py b/gitlab/v4/objects/merge_request_approvals.py
index 8c0b420b5..407da2e02 100644
--- a/gitlab/v4/objects/merge_request_approvals.py
+++ b/gitlab/v4/objects/merge_request_approvals.py
@@ -10,7 +10,6 @@
UpdateMixin,
)
-
__all__ = [
"ProjectApproval",
"ProjectApprovalManager",
diff --git a/gitlab/v4/objects/merge_requests.py b/gitlab/v4/objects/merge_requests.py
index 711a95f34..9ff72f95a 100644
--- a/gitlab/v4/objects/merge_requests.py
+++ b/gitlab/v4/objects/merge_requests.py
@@ -1,5 +1,6 @@
-from gitlab import cli, types
+from gitlab import cli
from gitlab import exceptions as exc
+from gitlab import types
from gitlab.base import RequiredOptional, RESTManager, RESTObject, RESTObjectList
from gitlab.mixins import (
CRUDMixin,
@@ -12,21 +13,21 @@
TimeTrackingMixin,
TodoMixin,
)
-from .commits import ProjectCommit, ProjectCommitManager
-from .issues import ProjectIssue, ProjectIssueManager
-from .merge_request_approvals import ( # noqa: F401
- ProjectMergeRequestApprovalManager,
- ProjectMergeRequestApprovalRuleManager,
-)
+
from .award_emojis import ProjectMergeRequestAwardEmojiManager # noqa: F401
+from .commits import ProjectCommit, ProjectCommitManager
from .discussions import ProjectMergeRequestDiscussionManager # noqa: F401
-from .notes import ProjectMergeRequestNoteManager # noqa: F401
from .events import ( # noqa: F401
ProjectMergeRequestResourceLabelEventManager,
ProjectMergeRequestResourceMilestoneEventManager,
ProjectMergeRequestResourceStateEventManager,
)
-
+from .issues import ProjectIssue, ProjectIssueManager
+from .merge_request_approvals import ( # noqa: F401
+ ProjectMergeRequestApprovalManager,
+ ProjectMergeRequestApprovalRuleManager,
+)
+from .notes import ProjectMergeRequestNoteManager # noqa: F401
__all__ = [
"MergeRequest",
diff --git a/gitlab/v4/objects/milestones.py b/gitlab/v4/objects/milestones.py
index 5dded37f8..0a53e1b07 100644
--- a/gitlab/v4/objects/milestones.py
+++ b/gitlab/v4/objects/milestones.py
@@ -1,15 +1,16 @@
-from gitlab import cli, types
+from gitlab import cli
from gitlab import exceptions as exc
+from gitlab import types
from gitlab.base import RequiredOptional, RESTManager, RESTObject, RESTObjectList
from gitlab.mixins import CRUDMixin, ObjectDeleteMixin, SaveMixin
+
from .issues import GroupIssue, GroupIssueManager, ProjectIssue, ProjectIssueManager
from .merge_requests import (
+ GroupMergeRequest,
ProjectMergeRequest,
ProjectMergeRequestManager,
- GroupMergeRequest,
)
-
__all__ = [
"GroupMilestone",
"GroupMilestoneManager",
diff --git a/gitlab/v4/objects/namespaces.py b/gitlab/v4/objects/namespaces.py
index a9e1ef56a..deee28172 100644
--- a/gitlab/v4/objects/namespaces.py
+++ b/gitlab/v4/objects/namespaces.py
@@ -1,7 +1,6 @@
from gitlab.base import RESTManager, RESTObject
from gitlab.mixins import RetrieveMixin
-
__all__ = [
"Namespace",
"NamespaceManager",
diff --git a/gitlab/v4/objects/notes.py b/gitlab/v4/objects/notes.py
index 6fa50b9f7..d85fea76d 100644
--- a/gitlab/v4/objects/notes.py
+++ b/gitlab/v4/objects/notes.py
@@ -1,7 +1,7 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import (
- CRUDMixin,
CreateMixin,
+ CRUDMixin,
DeleteMixin,
GetMixin,
ObjectDeleteMixin,
@@ -9,13 +9,13 @@
SaveMixin,
UpdateMixin,
)
+
from .award_emojis import ( # noqa: F401
ProjectIssueNoteAwardEmojiManager,
ProjectMergeRequestNoteAwardEmojiManager,
ProjectSnippetNoteAwardEmojiManager,
)
-
__all__ = [
"ProjectNote",
"ProjectNoteManager",
diff --git a/gitlab/v4/objects/notification_settings.py b/gitlab/v4/objects/notification_settings.py
index 1738ab9af..3682ed0af 100644
--- a/gitlab/v4/objects/notification_settings.py
+++ b/gitlab/v4/objects/notification_settings.py
@@ -1,7 +1,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import GetWithoutIdMixin, SaveMixin, UpdateMixin
-
__all__ = [
"NotificationSettings",
"NotificationSettingsManager",
diff --git a/gitlab/v4/objects/pages.py b/gitlab/v4/objects/pages.py
index 9f9c97d2d..709d9f034 100644
--- a/gitlab/v4/objects/pages.py
+++ b/gitlab/v4/objects/pages.py
@@ -1,7 +1,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CRUDMixin, ListMixin, ObjectDeleteMixin, SaveMixin
-
__all__ = [
"PagesDomain",
"PagesDomainManager",
diff --git a/gitlab/v4/objects/personal_access_tokens.py b/gitlab/v4/objects/personal_access_tokens.py
index 7d2c5ce0e..a326bd628 100644
--- a/gitlab/v4/objects/personal_access_tokens.py
+++ b/gitlab/v4/objects/personal_access_tokens.py
@@ -1,7 +1,6 @@
from gitlab.base import RESTManager, RESTObject
from gitlab.mixins import ListMixin
-
__all__ = [
"PersonalAccessToken",
"PersonalAccessTokenManager",
diff --git a/gitlab/v4/objects/pipelines.py b/gitlab/v4/objects/pipelines.py
index 95063d408..644df7dcd 100644
--- a/gitlab/v4/objects/pipelines.py
+++ b/gitlab/v4/objects/pipelines.py
@@ -2,8 +2,8 @@
from gitlab import exceptions as exc
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import (
- CRUDMixin,
CreateMixin,
+ CRUDMixin,
DeleteMixin,
ListMixin,
ObjectDeleteMixin,
@@ -13,7 +13,6 @@
UpdateMixin,
)
-
__all__ = [
"ProjectPipeline",
"ProjectPipelineManager",
diff --git a/gitlab/v4/objects/project_access_tokens.py b/gitlab/v4/objects/project_access_tokens.py
index 15ef33ad9..f59ea85ff 100644
--- a/gitlab/v4/objects/project_access_tokens.py
+++ b/gitlab/v4/objects/project_access_tokens.py
@@ -1,7 +1,6 @@
from gitlab.base import RESTManager, RESTObject
from gitlab.mixins import CreateMixin, DeleteMixin, ListMixin, ObjectDeleteMixin
-
__all__ = [
"ProjectAccessToken",
"ProjectAccessTokenManager",
diff --git a/gitlab/v4/objects/projects.py b/gitlab/v4/objects/projects.py
index 4223b1882..8401c5c91 100644
--- a/gitlab/v4/objects/projects.py
+++ b/gitlab/v4/objects/projects.py
@@ -1,9 +1,10 @@
-from gitlab import cli, types, utils
+from gitlab import cli
from gitlab import exceptions as exc
+from gitlab import types, utils
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import (
- CRUDMixin,
CreateMixin,
+ CRUDMixin,
ListMixin,
ObjectDeleteMixin,
RefreshMixin,
@@ -11,8 +12,8 @@
UpdateMixin,
)
-from .project_access_tokens import ProjectAccessTokenManager # noqa: F401
from .access_requests import ProjectAccessRequestManager # noqa: F401
+from .audit_events import ProjectAuditEventManager # noqa: F401
from .badges import ProjectBadgeManager # noqa: F401
from .boards import ProjectBoardManager # noqa: F401
from .branches import ProjectBranchManager, ProjectProtectedBranchManager # noqa: F401
@@ -25,14 +26,13 @@
from .deployments import ProjectDeploymentManager # noqa: F401
from .environments import ProjectEnvironmentManager # noqa: F401
from .events import ProjectEventManager # noqa: F401
-from .audit_events import ProjectAuditEventManager # noqa: F401
from .export_import import ProjectExportManager, ProjectImportManager # noqa: F401
from .files import ProjectFileManager # noqa: F401
from .hooks import ProjectHookManager # noqa: F401
from .issues import ProjectIssueManager # noqa: F401
from .jobs import ProjectJobManager # noqa: F401
from .labels import ProjectLabelManager # noqa: F401
-from .members import ProjectMemberManager, ProjectMemberAllManager # noqa: F401
+from .members import ProjectMemberAllManager, ProjectMemberManager # noqa: F401
from .merge_request_approvals import ( # noqa: F401
ProjectApprovalManager,
ProjectApprovalRuleManager,
@@ -48,6 +48,7 @@
ProjectPipelineManager,
ProjectPipelineScheduleManager,
)
+from .project_access_tokens import ProjectAccessTokenManager # noqa: F401
from .push_rules import ProjectPushRulesManager # noqa: F401
from .releases import ProjectReleaseManager # noqa: F401
from .repositories import RepositoryMixin
@@ -64,7 +65,6 @@
from .variables import ProjectVariableManager # noqa: F401
from .wikis import ProjectWikiManager # noqa: F401
-
__all__ = [
"GroupProject",
"GroupProjectManager",
diff --git a/gitlab/v4/objects/push_rules.py b/gitlab/v4/objects/push_rules.py
index 19062bf34..ee20f960d 100644
--- a/gitlab/v4/objects/push_rules.py
+++ b/gitlab/v4/objects/push_rules.py
@@ -8,7 +8,6 @@
UpdateMixin,
)
-
__all__ = [
"ProjectPushRules",
"ProjectPushRulesManager",
diff --git a/gitlab/v4/objects/releases.py b/gitlab/v4/objects/releases.py
index 9c941871c..ab490dd9f 100644
--- a/gitlab/v4/objects/releases.py
+++ b/gitlab/v4/objects/releases.py
@@ -1,7 +1,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CRUDMixin, NoUpdateMixin, ObjectDeleteMixin, SaveMixin
-
__all__ = [
"ProjectRelease",
"ProjectReleaseManager",
diff --git a/gitlab/v4/objects/repositories.py b/gitlab/v4/objects/repositories.py
index a171ffbf3..5a56a2d65 100644
--- a/gitlab/v4/objects/repositories.py
+++ b/gitlab/v4/objects/repositories.py
@@ -4,8 +4,9 @@
Currently this module only contains repository-related methods for projects.
"""
-from gitlab import cli, utils
+from gitlab import cli
from gitlab import exceptions as exc
+from gitlab import utils
class RepositoryMixin:
diff --git a/gitlab/v4/objects/runners.py b/gitlab/v4/objects/runners.py
index 15875abd5..8a18f9b38 100644
--- a/gitlab/v4/objects/runners.py
+++ b/gitlab/v4/objects/runners.py
@@ -1,5 +1,6 @@
-from gitlab import cli, types
+from gitlab import cli
from gitlab import exceptions as exc
+from gitlab import types
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import (
CRUDMixin,
@@ -9,7 +10,6 @@
SaveMixin,
)
-
__all__ = [
"RunnerJob",
"RunnerJobManager",
diff --git a/gitlab/v4/objects/services.py b/gitlab/v4/objects/services.py
index 17bf63a7d..6aedc3966 100644
--- a/gitlab/v4/objects/services.py
+++ b/gitlab/v4/objects/services.py
@@ -9,7 +9,6 @@
UpdateMixin,
)
-
__all__ = [
"ProjectService",
"ProjectServiceManager",
diff --git a/gitlab/v4/objects/settings.py b/gitlab/v4/objects/settings.py
index 6b7537bcd..1c8be2520 100644
--- a/gitlab/v4/objects/settings.py
+++ b/gitlab/v4/objects/settings.py
@@ -1,9 +1,8 @@
-from gitlab import types
from gitlab import exceptions as exc
+from gitlab import types
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import GetWithoutIdMixin, SaveMixin, UpdateMixin
-
__all__ = [
"ApplicationSettings",
"ApplicationSettingsManager",
diff --git a/gitlab/v4/objects/sidekiq.py b/gitlab/v4/objects/sidekiq.py
index 84306bc98..54238ab5c 100644
--- a/gitlab/v4/objects/sidekiq.py
+++ b/gitlab/v4/objects/sidekiq.py
@@ -2,7 +2,6 @@
from gitlab import exceptions as exc
from gitlab.base import RESTManager
-
__all__ = [
"SidekiqManager",
]
diff --git a/gitlab/v4/objects/snippets.py b/gitlab/v4/objects/snippets.py
index 330cc8c76..b893ecab2 100644
--- a/gitlab/v4/objects/snippets.py
+++ b/gitlab/v4/objects/snippets.py
@@ -1,5 +1,6 @@
-from gitlab import cli, utils
+from gitlab import cli
from gitlab import exceptions as exc
+from gitlab import utils
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CRUDMixin, ObjectDeleteMixin, SaveMixin, UserAgentDetailMixin
@@ -7,7 +8,6 @@
from .discussions import ProjectSnippetDiscussionManager # noqa: F401
from .notes import ProjectSnippetNoteManager # noqa: F401
-
__all__ = [
"Snippet",
"SnippetManager",
diff --git a/gitlab/v4/objects/statistics.py b/gitlab/v4/objects/statistics.py
index 2dbcdfe80..2e3edc729 100644
--- a/gitlab/v4/objects/statistics.py
+++ b/gitlab/v4/objects/statistics.py
@@ -1,7 +1,6 @@
from gitlab.base import RESTManager, RESTObject
from gitlab.mixins import GetWithoutIdMixin, RefreshMixin
-
__all__ = [
"ProjectAdditionalStatistics",
"ProjectAdditionalStatisticsManager",
diff --git a/gitlab/v4/objects/tags.py b/gitlab/v4/objects/tags.py
index cb3b11f26..cf37e21e8 100644
--- a/gitlab/v4/objects/tags.py
+++ b/gitlab/v4/objects/tags.py
@@ -3,7 +3,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import NoUpdateMixin, ObjectDeleteMixin
-
__all__ = [
"ProjectTag",
"ProjectTagManager",
diff --git a/gitlab/v4/objects/templates.py b/gitlab/v4/objects/templates.py
index 4da864bcb..04de46343 100644
--- a/gitlab/v4/objects/templates.py
+++ b/gitlab/v4/objects/templates.py
@@ -1,7 +1,6 @@
from gitlab.base import RESTManager, RESTObject
from gitlab.mixins import RetrieveMixin
-
__all__ = [
"Dockerfile",
"DockerfileManager",
diff --git a/gitlab/v4/objects/todos.py b/gitlab/v4/objects/todos.py
index 7dc7a51ec..23a06145e 100644
--- a/gitlab/v4/objects/todos.py
+++ b/gitlab/v4/objects/todos.py
@@ -3,7 +3,6 @@
from gitlab.base import RESTManager, RESTObject
from gitlab.mixins import DeleteMixin, ListMixin, ObjectDeleteMixin
-
__all__ = [
"Todo",
"TodoManager",
diff --git a/gitlab/v4/objects/triggers.py b/gitlab/v4/objects/triggers.py
index f45f4ef45..0eff8ac95 100644
--- a/gitlab/v4/objects/triggers.py
+++ b/gitlab/v4/objects/triggers.py
@@ -3,7 +3,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CRUDMixin, ObjectDeleteMixin, SaveMixin
-
__all__ = [
"ProjectTrigger",
"ProjectTriggerManager",
diff --git a/gitlab/v4/objects/users.py b/gitlab/v4/objects/users.py
index 8a8db710e..cc5cfd89a 100644
--- a/gitlab/v4/objects/users.py
+++ b/gitlab/v4/objects/users.py
@@ -1,9 +1,10 @@
-from gitlab import cli, types
+from gitlab import cli
from gitlab import exceptions as exc
+from gitlab import types
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import (
- CRUDMixin,
CreateMixin,
+ CRUDMixin,
DeleteMixin,
GetWithoutIdMixin,
ListMixin,
@@ -17,7 +18,6 @@
from .custom_attributes import UserCustomAttributeManager # noqa: F401
from .events import UserEventManager # noqa: F401
-
__all__ = [
"CurrentUserEmail",
"CurrentUserEmailManager",
diff --git a/gitlab/v4/objects/variables.py b/gitlab/v4/objects/variables.py
index 54ee1498f..2e5e483a8 100644
--- a/gitlab/v4/objects/variables.py
+++ b/gitlab/v4/objects/variables.py
@@ -7,7 +7,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CRUDMixin, ObjectDeleteMixin, SaveMixin
-
__all__ = [
"Variable",
"VariableManager",
diff --git a/gitlab/v4/objects/wikis.py b/gitlab/v4/objects/wikis.py
index 722095d89..52a230f45 100644
--- a/gitlab/v4/objects/wikis.py
+++ b/gitlab/v4/objects/wikis.py
@@ -1,7 +1,6 @@
from gitlab.base import RequiredOptional, RESTManager, RESTObject
from gitlab.mixins import CRUDMixin, ObjectDeleteMixin, SaveMixin
-
__all__ = [
"ProjectWiki",
"ProjectWikiManager",
diff --git a/setup.py b/setup.py
index 65a6de51b..a5cf54e32 100644
--- a/setup.py
+++ b/setup.py
@@ -1,8 +1,7 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
-from setuptools import setup
-from setuptools import find_packages
+from setuptools import find_packages, setup
def get_version():
diff --git a/tools/functional/cli/test_cli_artifacts.py b/tools/functional/cli/test_cli_artifacts.py
index 27d5d7473..4cb69aaf9 100644
--- a/tools/functional/cli/test_cli_artifacts.py
+++ b/tools/functional/cli/test_cli_artifacts.py
@@ -7,7 +7,6 @@
import pytest
-
content = textwrap.dedent(
"""\
test-artifact:
diff --git a/tools/functional/ee-test.py b/tools/functional/ee-test.py
index 4223617e3..3a9995177 100755
--- a/tools/functional/ee-test.py
+++ b/tools/functional/ee-test.py
@@ -2,7 +2,6 @@
import gitlab
-
P1 = "root/project1"
P2 = "root/project2"
MR_P1 = 1
diff --git a/tox.ini b/tox.ini
index 8dcdc6768..d3dfdfc01 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,7 +1,7 @@
[tox]
minversion = 1.6
skipsdist = True
-envlist = py39,py38,py37,py36,pep8,black,twine-check,mypy
+envlist = py39,py38,py37,py36,pep8,black,twine-check,mypy,isort
[testenv]
passenv = GITLAB_IMAGE GITLAB_TAG
@@ -31,6 +31,14 @@ deps = -r{toxinidir}/requirements.txt
commands =
black {posargs} .
+[testenv:isort]
+basepython = python3
+deps = -r{toxinidir}/requirements.txt
+ -r{toxinidir}/test-requirements.txt
+ isort
+commands =
+ isort --dont-order-by-type {posargs} {toxinidir}
+
[testenv:twine-check]
basepython = python3
deps = -r{toxinidir}/requirements.txt
@@ -60,6 +68,10 @@ ignore = E203,E501,W503
per-file-ignores =
gitlab/v4/objects/__init__.py:F401,F403
+[isort]
+profile = black
+multi_line_output = 3
+
[testenv:docs]
deps = -r{toxinidir}/rtd-requirements.txt
commands = python setup.py build_sphinx