mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-09 03:01:25 +08:00
Improve many __(a)exit__ annotations (#9696)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from _typeshed import Incomplete
|
||||
from collections.abc import Generator
|
||||
from enum import Enum
|
||||
from types import TracebackType
|
||||
from typing_extensions import Self
|
||||
|
||||
from influxdb_client.client.flux_table import TableList
|
||||
@@ -46,9 +47,13 @@ class FluxCsvParser:
|
||||
response_metadata_mode: FluxResponseMetadataMode = ...,
|
||||
) -> None: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, exc_type, exc_val, exc_tb) -> None: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
async def __aenter__(self) -> Self: ...
|
||||
async def __aexit__(self, exc_type, exc_val, exc_tb) -> None: ...
|
||||
async def __aexit__(
|
||||
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
|
||||
) -> None: ...
|
||||
def generator(self) -> Generator[Incomplete, None, None]: ...
|
||||
def generator_async(self): ...
|
||||
def parse_record(self, table_index, table, csv): ...
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from types import TracebackType
|
||||
from typing_extensions import Self
|
||||
|
||||
from influxdb_client import HealthCheck, InvokableScriptsApi, Ready
|
||||
@@ -43,7 +44,9 @@ class InfluxDBClient(_BaseClient):
|
||||
profilers: Incomplete | None = ...,
|
||||
) -> None: ...
|
||||
def __enter__(self) -> Self: ...
|
||||
def __exit__(self, exc_type: object, exc_value: object, traceback: object) -> None: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def from_config_file(cls, config_file: str = ..., debug: Incomplete | None = ..., enable_gzip: bool = ..., **kwargs): ...
|
||||
@classmethod
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from _typeshed import Incomplete
|
||||
from types import TracebackType
|
||||
from typing_extensions import Self
|
||||
|
||||
from influxdb_client.client._base import _BaseClient
|
||||
@@ -37,7 +38,9 @@ class InfluxDBClientAsync(_BaseClient):
|
||||
profilers: Incomplete | None = ...,
|
||||
) -> None: ...
|
||||
async def __aenter__(self) -> Self: ...
|
||||
async def __aexit__(self, exc_type: object, exc: object, tb: object) -> None: ...
|
||||
async def __aexit__(
|
||||
self, exc_type: type[BaseException] | None, exc: BaseException | None, tb: TracebackType | None
|
||||
) -> None: ...
|
||||
async def close(self) -> None: ...
|
||||
@classmethod
|
||||
def from_config_file(cls, config_file: str = ..., debug: Incomplete | None = ..., enable_gzip: bool = ..., **kwargs): ...
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import multiprocessing
|
||||
from _typeshed import Incomplete
|
||||
from types import TracebackType
|
||||
|
||||
logger: Incomplete
|
||||
|
||||
@@ -18,5 +19,7 @@ class MultiprocessingWriter(multiprocessing.Process):
|
||||
def start(self) -> None: ...
|
||||
def terminate(self) -> None: ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, exc_type, exc_value, traceback) -> None: ...
|
||||
def __exit__(
|
||||
self, exc_type: type[BaseException] | None, exc_value: BaseException | None, traceback: TracebackType | None
|
||||
) -> None: ...
|
||||
def __del__(self) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user