diff options
| author | Nejc Habjan <nejc.habjan@siemens.com> | 2022-08-01 10:12:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-01 10:12:03 +0200 |
| commit | 1136b17f4e5f36c66c3a67292e508b43ded9ca3e (patch) | |
| tree | 362a292fe396e16ca688d3cda3dd8aa51c7b50fa /gitlab/utils.py | |
| parent | 6cedbc8f4808f795332d0d4642b7469681a4bf48 (diff) | |
| parent | 24d17b43da16dd11ab37b2cee561d9392c90f32e (diff) | |
| download | gitlab-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.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 |
