Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions airbyte/_connector_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def get_config(self) -> dict[str, Any]:

If secrets are passed by reference (`secret_reference::*`), this will return the raw config
dictionary without secrets hydrated.
"""
""" # noqa: DOC501
if self._config_dict is None:
raise exc.AirbyteConnectorConfigurationMissingError(
connector_name=self.name,
Expand Down Expand Up @@ -259,7 +259,7 @@ def print_config_spec(
Otherwise, it will be printed to the console.
stderr: If True, print to stderr instead of stdout. This is useful when we
want to print the spec to the console but not interfere with other output.
"""
""" # noqa: DOC501
if output_file and stderr:
raise exc.PyAirbyteInputError(
message="You can set output_file or stderr but not both.",
Expand Down Expand Up @@ -332,7 +332,7 @@ def check(self) -> None:
* execute the connector with check --config <config_file>
* Listen to the messages and return the first AirbyteCatalog that comes along.
* Make sure the subprocess is killed when the function returns.
"""
""" # noqa: DOC501
with as_temp_files([self._hydrated_config]) as [config_file]:
try:
for msg in self._execute(["check", "--config", config_file]):
Expand Down
4 changes: 2 additions & 2 deletions airbyte/_executors/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _stream_from_subprocess(
in a separate thread while output is read concurrently. This avoids a
potential deadlock where the subprocess blocks on stdout (buffer full)
while we're waiting for input to finish before reading stdout.
"""
""" # noqa: DOC501
input_thread: Thread | None = None
exception_holder = ExceptionHolder()
if isinstance(stdin, AirbyteMessageIterator):
Expand Down Expand Up @@ -180,7 +180,7 @@ def __init__(
"""Initialize a connector executor.

The 'name' param is required if 'metadata' is None.
"""
""" # noqa: DOC501
if not name and not metadata:
raise exc.PyAirbyteInternalError(message="Either name or metadata must be provided.")

Expand Down
2 changes: 1 addition & 1 deletion airbyte/_executors/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def ensure_installation(
"""Ensure that the connector executable can be found.

The auto_fix parameter is ignored for this executor type.
"""
""" # noqa: DOC501
_ = auto_fix
try:
assert (
Expand Down
2 changes: 1 addition & 1 deletion airbyte/_executors/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def ensure_installation(
"""Ensure that the connector executable can be found.

The auto_fix parameter is ignored for this executor type.
"""
""" # noqa: DOC501
_ = auto_fix
try:
self.execute(["spec"])
Expand Down
2 changes: 1 addition & 1 deletion airbyte/_executors/noop.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def execute(
"""Execute a command and return an iterator of STDOUT lines.

Only the 'spec' command is supported. Other commands will raise an error.
"""
""" # noqa: DOC501
_ = stdin, suppress_stderr # Unused

if args == ["spec"]:
Expand Down
8 changes: 4 additions & 4 deletions airbyte/_executors/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def __init__(
- False: Use Docker instead (handled by factory)
- Path: Use interpreter at this path or interpreter name/command
- str: Use uv-managed Python version (semver patterns like "3.12", "3.11.5")
"""
""" # noqa: DOC501
super().__init__(name=name, metadata=metadata, target_version=target_version)

if not pip_url and metadata and not metadata.pypi_package_name:
Expand Down Expand Up @@ -115,7 +115,7 @@ def install(self) -> None:
"""Install the connector in a virtual environment.

After installation, the installed version will be stored in self.reported_version.
"""
""" # noqa: DOC501
if not (
self.use_python is None
or self.use_python is True
Expand Down Expand Up @@ -208,7 +208,7 @@ def get_installed_version(

In the venv, we run the following:
> python -c "from importlib.metadata import version; print(version('<connector-name>'))"
"""
""" # noqa: DOC501
if not recheck and self.reported_version:
return self.reported_version

Expand Down Expand Up @@ -258,7 +258,7 @@ def ensure_installation(

Note: Version verification is not supported for connectors installed from a
local path.
"""
""" # noqa: DOC501
# Store the installed version (or None if not installed)
if not self.reported_version:
self.reported_version = self.get_installed_version()
Expand Down
6 changes: 3 additions & 3 deletions airbyte/_executors/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def _try_get_manifest_connector_files(
- `PyAirbyteInputError`: If `source_name` is `None`.
- `AirbyteConnectorInstallationError`: If the manifest cannot be downloaded or parsed,
or if components.zip cannot be downloaded or extracted (excluding 404 errors).
"""
""" # noqa: DOC501
if source_name is None:
raise exc.PyAirbyteInputError(
message="Param 'source_name' is required.",
Expand Down Expand Up @@ -136,7 +136,7 @@ def _get_local_executor(
local_executable: Path | str | Literal[True],
version: str | None,
) -> Executor:
"""Get a local executor for a connector."""
"""Get a local executor for a connector.""" # noqa: DOC501
if version:
raise exc.PyAirbyteInputError(
message="Param 'version' is not supported when 'local_executable' is set."
Expand Down Expand Up @@ -188,7 +188,7 @@ def get_connector_executor( # noqa: PLR0912, PLR0913, PLR0914, PLR0915, C901 #
"""This factory function creates an executor for a connector.

For documentation of each arg, see the function `airbyte.sources.util.get_source()`.
"""
""" # noqa: DOC501
install_method_count = sum(
[
bool(local_executable),
Expand Down
2 changes: 1 addition & 1 deletion airbyte/_message_iterators.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def from_str_buffer(cls, buffer: IO[str]) -> AirbyteMessageIterator:
"""Create a iterator that reads messages from a buffer."""

def generator() -> Generator[AirbyteMessage, None, None]:
"""Yields AirbyteMessage objects read from STDIN."""
"""Yields AirbyteMessage objects read from STDIN.""" # noqa: DOC501
while True:
next_line: str | None = next(buffer, None) # Read the next line from STDIN
if next_line is None:
Expand Down
4 changes: 2 additions & 2 deletions airbyte/_processors/sql/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def _table_exists(
"""Return true if the given table exists.

We override the default implementation because BigQuery is very slow at scanning tables.
"""
""" # noqa: DOC501
client = self.sql_config.get_vendor_client()
table_id = f"{self.sql_config.project_name}.{self.sql_config.dataset_name}.{table_name}"
try:
Expand Down Expand Up @@ -286,7 +286,7 @@ def _swap_temp_table_with_final_table(
For example, BigQuery expects this format:

ALTER TABLE my_schema.my_old_table_name RENAME TO my_new_table_name;
"""
""" # noqa: DOC501
if final_table_name is None:
raise exc.PyAirbyteInternalError(message="Arg 'final_table_name' cannot be None.")
if temp_table_name is None:
Expand Down
6 changes: 3 additions & 3 deletions airbyte/_processors/sql/snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class SnowflakeConfig(SqlConfig):
data_retention_time_in_days: int | None = None

def _validate_authentication_config(self) -> None:
"""Validate that authentication configuration is correct."""
"""Validate that authentication configuration is correct.""" # noqa: DOC501
auth_methods = {
"password": self.password is not None,
"private_key": self.private_key is not None,
Expand Down Expand Up @@ -82,7 +82,7 @@ def _validate_authentication_config(self) -> None:
)

def _get_private_key_content(self) -> bytes:
"""Get the private key content from either private_key or private_key_path."""
"""Get the private key content from either private_key or private_key_path.""" # noqa: DOC501
if self.private_key:
return str(self.private_key).encode("utf-8")
if self.private_key_path:
Expand Down Expand Up @@ -217,7 +217,7 @@ def _write_files_to_new_table(
stream_name: str,
batch_id: str,
) -> str:
"""Write files to a new table."""
"""Write files to a new table.""" # noqa: DOC501
temp_table_name = self._create_table_for_loading(
stream_name=stream_name,
batch_id=batch_id,
Expand Down
Loading
Loading