summaryrefslogtreecommitdiff
path: root/gitlab/utils.py
diff options
context:
space:
mode:
authorNejc Habjan <nejc.habjan@siemens.com>2022-08-01 10:12:03 +0200
committerGitHub <noreply@github.com>2022-08-01 10:12:03 +0200
commit1136b17f4e5f36c66c3a67292e508b43ded9ca3e (patch)
tree362a292fe396e16ca688d3cda3dd8aa51c7b50fa /gitlab/utils.py
parent6cedbc8f4808f795332d0d4642b7469681a4bf48 (diff)
parent24d17b43da16dd11ab37b2cee561d9392c90f32e (diff)
downloadgitlab-1136b17f4e5f36c66c3a67292e508b43ded9ca3e.tar.gz
Merge pull request #2211 from python-gitlab/jlvillal/mypy_step_step
chore: enable mypy check `disallow_any_generics`
Diffstat (limited to 'gitlab/utils.py')
-rw-r--r--gitlab/utils.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/gitlab/utils.py b/gitlab/utils.py
index f3d97f7..c8ecd1b 100644
--- a/gitlab/utils.py
+++ b/gitlab/utils.py
@@ -34,7 +34,7 @@ class _StdoutStream:
def response_content(
response: requests.Response,
streamed: bool,
- action: Optional[Callable],
+ action: Optional[Callable[[bytes], None]],
chunk_size: int,
*,
iterator: bool,
@@ -56,11 +56,11 @@ def response_content(
def _transform_types(
data: Dict[str, Any],
- custom_types: dict,
+ custom_types: Dict[str, Any],
*,
transform_data: bool,
transform_files: Optional[bool] = True,
-) -> Tuple[dict, dict]:
+) -> Tuple[Dict[str, Any], Dict[str, Any]]:
"""Copy the data dict with attributes that have custom types and transform them
before being sent to the server.
@@ -157,7 +157,7 @@ def remove_none_from_dict(data: Dict[str, Any]) -> Dict[str, Any]:
def warn(
message: str,
*,
- category: Optional[Type] = None,
+ category: Optional[Type[Warning]] = None,
source: Optional[Any] = None,
) -> None:
"""This `warnings.warn` wrapper function attempts to show the location causing the