diff options
author | John L. Villalovos <john@sodarock.com> | 2022-08-01 00:29:18 -0700 |
---|---|---|
committer | John L. Villalovos <john@sodarock.com> | 2022-08-01 00:29:18 -0700 |
commit | 24d17b43da16dd11ab37b2cee561d9392c90f32e (patch) | |
tree | 2adacb59887c121231dd98cf04523c57674ba9c5 /gitlab/utils.py | |
parent | 54dd4c3f857f82aa8781b0daf22fa2dd3c60c2c4 (diff) | |
download | gitlab-24d17b43da16dd11ab37b2cee561d9392c90f32e.tar.gz |
chore: enable mypy check `disallow_any_generics`
Diffstat (limited to 'gitlab/utils.py')
-rw-r--r-- | gitlab/utils.py | 8 |
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 |