Skip to content

Commit

Permalink
fix: Fix typo RecordsWitoutSchemaException -> RecordsWithoutSchemaExc…
Browse files Browse the repository at this point in the history
…eption
  • Loading branch information
edgarrmondragon committed Sep 1, 2022
1 parent e84036b commit ed536a8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
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

0 comments on commit ed536a8

Please sign in to comment.