summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-02-28 10:34:01 +0100
committerGitHub <noreply@github.com>2021-02-28 10:34:01 +0100
commit74414552bd054b32016a7a9e010b13cd8a4f33d9 (patch)
tree626abc8aba215d583398b6ee6cbc232cfa4a00f7
parent5bc158d3d4a8ac0d0116fea7cfd33ad897918741 (diff)
parentad72ef35707529058c7c680f334c285746b2f690 (diff)
downloadgitlab-74414552bd054b32016a7a9e010b13cd8a4f33d9.tar.gz
Merge pull request #1345 from JohnVillalovos/jlvillal/mypy_base_fixes
chore: add additional type-hints for gitlab/base.py
-rw-r--r--gitlab/base.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/gitlab/base.py b/gitlab/base.py
index 30f0659..a3fdcf7 100644
--- a/gitlab/base.py
+++ b/gitlab/base.py
@@ -16,6 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import importlib
+from types import ModuleType
from typing import Any, Dict, Optional, Type
from .client import Gitlab, GitlabList
@@ -38,7 +39,12 @@ class RESTObject(object):
without ID in the url.
"""
- _id_attr = "id"
+ _id_attr: Optional[str] = "id"
+ _attrs: Dict[str, Any]
+ _module: ModuleType
+ _parent_attrs: Dict[str, Any]
+ _updated_attrs: Dict[str, Any]
+ manager: "RESTManager"
def __init__(self, manager: "RESTManager", attrs: Dict[str, Any]) -> None:
self.__dict__.update(