Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix typo RecordsWitoutSchemaException -> RecordsWithoutSchemaException #856

Merged
merged 2 commits into from
Sep 1, 2022
Merged
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
singer_sdk.exceptions.RecordsWithoutSchemaException
==================================================

.. currentmodule:: singer_sdk.exceptions

.. autoclass:: RecordsWithoutSchemaException
:members:
2 changes: 1 addition & 1 deletion docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Exception Types
exceptions.InvalidStreamSortException
exceptions.MapExpressionError
exceptions.MaxRecordsLimitException
exceptions.RecordsWitoutSchemaException
exceptions.RecordsWithoutSchemaException
exceptions.RetriableAPIError
exceptions.StreamMapConfigError
exceptions.TapStreamConnectionFailure
Expand Down
2 changes: 1 addition & 1 deletion singer_sdk/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class MaxRecordsLimitException(Exception):
"""Exception to raise if the maximum number of allowable records is exceeded."""


class RecordsWitoutSchemaException(Exception):
class RecordsWithoutSchemaException(Exception):
"""Raised if a target receives RECORD messages prior to a SCHEMA message."""


Expand Down
11 changes: 6 additions & 5 deletions singer_sdk/target_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from joblib import Parallel, delayed, parallel_backend

from singer_sdk.cli import common_options
from singer_sdk.exceptions import RecordsWitoutSchemaException
from singer_sdk.exceptions import RecordsWithoutSchemaException
from singer_sdk.helpers._classproperty import classproperty
from singer_sdk.helpers._compat import final
from singer_sdk.helpers.capabilities import CapabilitiesEnum, PluginCapabilities
Expand Down Expand Up @@ -135,7 +135,7 @@ def get_sink(
sink depending on the values within the `record` object. Otherwise, please see
`default_sink_class` property and/or the `get_sink_class()` method.

Raises :class:`singer_sdk.exceptions.RecordsWitoutSchemaException` if sink does
Raises :class:`singer_sdk.exceptions.RecordsWithoutSchemaException` if sink does
not exist and schema is not sent.

Args:
Expand Down Expand Up @@ -233,16 +233,17 @@ def add_sink(
return result

def _assert_sink_exists(self, stream_name: str) -> None:
"""Raise a RecordsWitoutSchemaException exception if stream doesn't exist.
"""Raise a RecordsWithoutSchemaException exception if stream doesn't exist.

Args:
stream_name: TODO

Raises:
RecordsWitoutSchemaException: If sink does not exist and schema is not sent.
RecordsWithoutSchemaException: If sink does not exist and schema
is not sent.
"""
if not self.sink_exists(stream_name):
raise RecordsWitoutSchemaException(
raise RecordsWithoutSchemaException(
f"A record for stream '{stream_name}' was encountered before a "
"corresponding schema."
)
Expand Down