Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Address comments from previous PR
Signed-off-by: Achal Shah <achals@gmail.com>
  • Loading branch information
achals committed Jun 21, 2021
commit 0b3d14c661491e4bb44acdc71d7f9d85cec7104a
2 changes: 1 addition & 1 deletion sdk/python/feast/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def __init__(self, provider_name):


class FeastModuleImportError(Exception):
def __init__(self, module_name, module_type="provider"):
def __init__(self, module_name: str, module_type: str):
super().__init__(f"Could not import {module_type} module '{module_name}'")


Expand Down
4 changes: 1 addition & 3 deletions sdk/python/feast/infra/offline_stores/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ def get_offline_store_from_config(offline_store_config: Any,) -> OfflineStore:
# The original exception can be anything - either module not found,
# or any other kind of error happening during the module import time.
# So we should include the original error as well in the stack trace.
raise errors.FeastModuleImportError(
module_name, module_type="OfflineStore"
) from e
raise errors.FeastModuleImportError(module_name, "OfflineStore") from e

# Try getting the provider class definition
try:
Expand Down
4 changes: 1 addition & 3 deletions sdk/python/feast/infra/online_stores/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ def get_online_store_from_config(online_store_config: Any,) -> OnlineStore:
# The original exception can be anything - either module not found,
# or any other kind of error happening during the module import time.
# So we should include the original error as well in the stack trace.
raise errors.FeastModuleImportError(
module_name, module_type="OnlineStore"
) from e
raise errors.FeastModuleImportError(module_name, "OnlineStore") from e

# Try getting the provider class definition
try:
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def get_provider(config: RepoConfig, repo_path: Path) -> Provider:
# The original exception can be anything - either module not found,
# or any other kind of error happening during the module import time.
# So we should include the original error as well in the stack trace.
raise errors.FeastModuleImportError(module_name) from e
raise errors.FeastModuleImportError(module_name, "provider") from e
Comment thread
tsotnet marked this conversation as resolved.
Outdated

# Try getting the provider class definition
try:
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/repo_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ def get_config_class_from_type(
# The original exception can be anything - either module not found,
# or any other kind of error happening during the module import time.
# So we should include the original error as well in the stack trace.
raise errors.FeastModuleImportError(module_name, module_type=store_type) from e
raise errors.FeastModuleImportError(module_name, store_type) from e

# Try getting the provider class definition
try:
Expand Down