feat: updating influxdbsession write

This commit is contained in:
Mose Mueller 2023-08-02 11:14:43 +02:00
parent 5a02be33ba
commit 5386f06a43

View File

@ -89,28 +89,26 @@ class InfluxDBSession:
def write( def write(
self, self,
bucket: str, bucket: str,
org: Optional[str] = None,
record: Union[ # type: ignore record: Union[ # type: ignore
str, str,
Iterable["str"], Iterable[str],
Point, Point,
Iterable["Point"], Iterable[Point],
dict, dict[str, Any],
Iterable["dict"], Iterable[dict[str, Any]],
bytes, bytes,
Iterable["bytes"], Iterable[bytes],
Observable, Observable[Any],
NamedTuple, NamedTuple,
Iterable["NamedTuple"], Iterable[NamedTuple],
"dataclass", # type: ignore ],
Iterable["dataclass"], # type: ignore org: Optional[str] = None,
] = None,
write_precision: WritePrecision = DEFAULT_WRITE_PRECISION, # type: ignore write_precision: WritePrecision = DEFAULT_WRITE_PRECISION, # type: ignore
**kwargs: Any, **kwargs: Any,
) -> Any: ) -> Any:
self._write_api.write( # type: ignore self._write_api.write( # type: ignore
bucket=bucket, bucket=bucket,
org=org, org=org if org is not None else self.org,
record=record, record=record,
write_precision=write_precision, # type: ignore write_precision=write_precision, # type: ignore
**kwargs, **kwargs,