Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve type-hints for gitlab/base.py#1338

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nejch merged 1 commit intopython-gitlab:masterfromJohnVillalovos:jlvillal/mypy_base
Feb 26, 2021
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletionsgitlab/base.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

import importlib
from typing import Any, Dict, Optional
from typing import Any, Dict, Optional, Type

from .client import Gitlab, GitlabList

Expand DownExpand Up@@ -171,7 +171,9 @@ class RESTObjectList(object):
_list: A GitlabList object
"""

def __init__(self, manager: "RESTManager", obj_cls, _list: GitlabList) -> None:
def __init__(
self, manager: "RESTManager", obj_cls: Type[RESTObject], _list: GitlabList
) -> None:
"""Creates an objects list from a GitlabList.

You should not create objects of this type, but use managers list()
Expand DownExpand Up@@ -246,7 +248,7 @@ class RESTManager(object):
"""

_path: Optional[str] = None
_obj_cls: Optional[Any] = None
_obj_cls: Optional[Type[RESTObject]] = None
_from_parent_attrs: Dict[str, Any] = {}

def __init__(self, gl: Gitlab, parent: Optional[RESTObject] = None) -> None:
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp