Skip to content

Commit c83eaf4

Browse files
chore: remove usage of 'from ... import *'
In gitlab/v4/objects/*.py remove usage of: * from gitlab.base import * * from gitlab.mixins import * Change them to: * from gitlab.base import CLASS_NAME * from gitlab.mixins import CLASS_NAME Programmatically update code to explicitly import needed classes only. After the change the output of: $ flake8 gitlab/v4/objects/*py | grep 'REST\|Mixin' Is empty. Before many messages about unable to determine if it was a valid name.
1 parent a7ec67f commit c83eaf4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+244
-114
lines changed

gitlab/v4/objects/access_requests.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
from gitlab.base import * # noqa
2-
from gitlab.mixins import * # noqa
1+
from gitlab.base import RESTManager, RESTObject
2+
from gitlab.mixins import (
3+
AccessRequestMixin,
4+
CreateMixin,
5+
DeleteMixin,
6+
ListMixin,
7+
ObjectDeleteMixin,
8+
)
39

410

511
__all__ = [

gitlab/v4/objects/appearance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from gitlab import exceptions as exc
2-
from gitlab.base import * # noqa
3-
from gitlab.mixins import * # noqa
2+
from gitlab.base import RESTManager, RESTObject
3+
from gitlab.mixins import GetWithoutIdMixin, SaveMixin, UpdateMixin
44

55

66
__all__ = [

gitlab/v4/objects/applications.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from gitlab.base import * # noqa
2-
from gitlab.mixins import * # noqa
1+
from gitlab.base import RESTManager, RESTObject
2+
from gitlab.mixins import CreateMixin, DeleteMixin, ListMixin, ObjectDeleteMixin
33

44
__all__ = [
55
"Application",

gitlab/v4/objects/audit_events.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
https://docs.gitlab.com/ee/api/audit_events.html#project-audit-events
44
"""
55

6-
from gitlab.base import * # noqa
7-
from gitlab.mixins import * # noqa
6+
from gitlab.base import RESTManager, RESTObject
7+
from gitlab.mixins import RetrieveMixin
88

99
__all__ = [
1010
"ProjectAudit",

gitlab/v4/objects/award_emojis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from gitlab.base import * # noqa
2-
from gitlab.mixins import * # noqa
1+
from gitlab.base import RESTManager, RESTObject
2+
from gitlab.mixins import NoUpdateMixin, ObjectDeleteMixin
33

44

55
__all__ = [

gitlab/v4/objects/badges.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from gitlab.base import * # noqa
2-
from gitlab.mixins import * # noqa
1+
from gitlab.base import RESTManager, RESTObject
2+
from gitlab.mixins import BadgeRenderMixin, CRUDMixin, ObjectDeleteMixin, SaveMixin
33

44

55
__all__ = [

gitlab/v4/objects/boards.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from gitlab.base import * # noqa
2-
from gitlab.mixins import * # noqa
1+
from gitlab.base import RESTManager, RESTObject
2+
from gitlab.mixins import CRUDMixin, ObjectDeleteMixin, SaveMixin
33

44

55
__all__ = [

gitlab/v4/objects/branches.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from gitlab import cli
22
from gitlab import exceptions as exc
3-
from gitlab.base import * # noqa
4-
from gitlab.mixins import * # noqa
3+
from gitlab.base import RESTManager, RESTObject
4+
from gitlab.mixins import NoUpdateMixin, ObjectDeleteMixin
55

66

77
__all__ = [

gitlab/v4/objects/broadcast_messages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from gitlab.base import * # noqa
2-
from gitlab.mixins import * # noqa
1+
from gitlab.base import RESTManager, RESTObject
2+
from gitlab.mixins import CRUDMixin, ObjectDeleteMixin, SaveMixin
33

44

55
__all__ = [

gitlab/v4/objects/clusters.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from gitlab import exceptions as exc
2-
from gitlab.base import * # noqa
3-
from gitlab.mixins import * # noqa
2+
from gitlab.base import RESTManager, RESTObject
3+
from gitlab.mixins import CRUDMixin, CreateMixin, ObjectDeleteMixin, SaveMixin
44

55

66
__all__ = [

0 commit comments

Comments
 (0)