Skip to content

Commit

Permalink
Sync aioboto3 generated stubs
Browse files Browse the repository at this point in the history
  • Loading branch information
vemel committed Dec 8, 2024
1 parent 5bfec45 commit 7a8baa3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
20 changes: 11 additions & 9 deletions mypy_boto3_builder/stubs_static/types-boto3/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ Copyright 2024 Vlad Emelianov
"""

import logging
from typing import Any

from boto3 import session as session
from boto3.resources.base import ServiceResource
from boto3.session import Session as Session
from botocore.client import BaseClient
from botocore.config import Config
from botocore.session import Session as BotocoreSession

__author__: str
__version__: str
__author__: str = ...
__version__: str = ...

DEFAULT_SESSION: Session | None
DEFAULT_SESSION: Session | None = ...

def setup_default_session(
*,
Expand All @@ -27,12 +28,13 @@ def setup_default_session(
profile_name: str | None = ...,
) -> None: ...
def set_stream_logger(
name: str = ..., level: int = ..., format_string: str | None = ...
name: str = ...,
level: int = ...,
format_string: str | None = ...,
) -> None: ...
def _get_default_session() -> Session: ...

class NullHandler(logging.Handler):
def emit(self, record: Any) -> Any: ...
class NullHandler(logging.Handler): ...

def client(
service_name: str,
Expand All @@ -45,7 +47,7 @@ def client(
aws_secret_access_key: str | None = ...,
aws_session_token: str | None = ...,
config: Config | None = ...,
) -> Any: ...
) -> BaseClient: ...
def resource(
service_name: str,
region_name: str | None = ...,
Expand All @@ -57,4 +59,4 @@ def resource(
aws_secret_access_key: str | None = ...,
aws_session_token: str | None = ...,
config: Config | None = ...,
) -> Any: ...
) -> ServiceResource: ...
10 changes: 4 additions & 6 deletions mypy_boto3_builder/stubs_static/types-boto3/session.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ Type annotations for boto3.session module.
Copyright 2024 Vlad Emelianov
"""

from typing import Any

from boto3.exceptions import ResourceNotExistsError as ResourceNotExistsError
from boto3.exceptions import UnknownAPIVersionError as UnknownAPIVersionError
from boto3.resources.base import ServiceResource
from boto3.resources.factory import ResourceFactory
from botocore.client import BaseClient
from botocore.config import Config
from botocore.credentials import Credentials
from botocore.exceptions import DataNotFoundError as DataNotFoundError
Expand Down Expand Up @@ -39,7 +39,6 @@ class Session:
def events(self) -> BaseEventHooks: ...
@property
def available_profiles(self) -> list[str]: ...
def _setup_loader(self) -> None: ...
def get_available_services(self) -> list[str]: ...
def get_available_resources(self) -> list[str]: ...
def get_available_partitions(self) -> list[str]: ...
Expand All @@ -51,7 +50,6 @@ class Session:
) -> list[str]: ...
def get_credentials(self) -> Credentials | None: ...
def get_partition_for_region(self, region_name: str) -> str: ...
def _register_default_handlers(self) -> None: ...
def client(
self,
service_name: str,
Expand All @@ -64,7 +62,7 @@ class Session:
aws_secret_access_key: str | None = ...,
aws_session_token: str | None = ...,
config: Config | None = ...,
) -> Any: ...
) -> BaseClient: ...
def resource(
self,
service_name: str,
Expand All @@ -77,4 +75,4 @@ class Session:
aws_secret_access_key: str | None = ...,
aws_session_token: str | None = ...,
config: Config | None = ...,
) -> Any: ...
) -> ServiceResource: ...
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Session:
profile_name: Optional[str] = ...,
) -> None:
self._session: BotocoreSession
self.resource_factory: AIOBoto3ResourceFactory
self.resource_factory: AIOBoto3ResourceFactory # type: ignore [override]
self._loader: Loader
def get_credentials(self) -> Optional[AioCredentials]: ...

Expand Down

0 comments on commit 7a8baa3

Please sign in to comment.