8000 chore: fix F401 errors reported by flake8 · oux/python-gitlab@ff21eb6 · GitHub
[go: up one dir, main page]

Skip to content

Commit ff21eb6

Browse files
chore: fix F401 errors reported by flake8
F401: Module imported but unused https://www.flake8rules.com/rules/F401.html
1 parent 630901b commit ff21eb6

24 files changed

+93
-101
lines changed

gitlab/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@
1818

1919
import warnings
2020

21-
import gitlab.config
22-
from gitlab.__version__ import (
21+
import gitlab.config # noqa: F401
22+
from gitlab.__version__ import ( # noqa: F401
2323
__author__,
2424
__copyright__,
2525
__email__,
2626
__license__,
2727
__title__,
2828
__version__,
2929
)
30-
from gitlab.client import Gitlab, GitlabList
31-
from gitlab.const import * # noqa
32-
from gitlab.exceptions import * # noqa
30+
from gitlab.client import Gitlab, GitlabList # noqa: F401
31+
from gitlab.const import * # noqa: F401,F403
32+
from gitlab.exceptions import * # noqa: F401,F403
3333

3434

3535
warnings.filterwarnings("default", category=DeprecationWarning, module="^gitlab")

gitlab/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import sys
2424
from typing import Any, Callable, Dict, Optional, Tuple, Union
2525

26-
import gitlab.config
26+
import gitlab.config # noqa: F401
2727

2828
camel_re = re.compile("(.)([A-Z])")
2929

gitlab/mixins.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
Dict,
2323
List,
2424
Optional,
25-
Tuple,
2625
Type,
2726
TYPE_CHECKING,
2827
Union,

gitlab/tests/objects/test_bridges.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
"""
22
GitLab API: https://docs.gitlab.com/ee/api/jobs.html#list-pipeline-bridges
33
"""
4-
import re
5-
64
import pytest
75
import responses
86

9-
from gitlab.v4.objects import Project, ProjectPipelineBridge
7+
from gitlab.v4.objects import ProjectPipelineBridge
108

119

1210
@pytest.fixture

gitlab/tests/objects/test_submodules.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
import pytest
55
import responses
66

7-
from gitlab.v4.objects import Project
8-
97

108
@pytest.fixture
119
def resp_update_submodule():

gitlab/tests/test_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1717

1818
import os
19-
import unittest
2019
from textwrap import dedent
2120

2221
import mock

gitlab/tests/test_gitlab_http_methods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from httmock import HTTMock, urlmatch, response
55

6-
from gitlab import *
6+
from gitlab import GitlabHttpError, GitlabList, GitlabParsingError
77

88

99
def test_build_url(gl):

gitlab/v4/objects/commits.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from gitlab import exceptions as exc
33
from gitlab.base import RequiredOptional, RESTManager, RESTObject
44
from gitlab.mixins import CreateMixin, ListMixin, RefreshMixin, RetrieveMixin
5-
from .discussions import ProjectCommitDiscussionManager
5+
from .discussions import ProjectCommitDiscussionManager # noqa: F401
66

77

88
__all__ = [

gitlab/v4/objects/discussions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from gitlab.base import RequiredOptional, RESTManager, RESTObject
22
from gitlab.mixins import CreateMixin, RetrieveMixin, SaveMixin, UpdateMixin
3-
from .notes import (
3+
from .notes import ( # noqa: F401
44
ProjectCommitDiscussionNoteManager,
55
ProjectIssueDiscussionNoteManager,
66
ProjectMergeRequestDiscussionNoteManager,

gitlab/v4/objects/epics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
SaveMixin,
1111
UpdateMixin,
1212
)
13-
from .events import GroupEpicResourceLabelEventManager
13+
from .events import GroupEpicResourceLabelEventManager # noqa: F401
1414

1515

1616
__all__ = [

0 commit comments

Comments
 (0)
0