Skip to content

Commit

Permalink
Rename import exception so as to not define a commonly used variable …
Browse files Browse the repository at this point in the history
…in the module scope
  • Loading branch information
dagardner-nv committed Dec 18, 2023
1 parent 19a34e8 commit 6068dd8
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions morpheus/controllers/elasticsearch_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
from elasticsearch import ConnectionError as ESConnectionError
from elasticsearch import Elasticsearch
from elasticsearch.helpers import parallel_bulk
except ImportError as exc:
IMPORT_EXCEPTION = exc
except ImportError as import_exc:
IMPORT_EXCEPTION = import_exc


class ElasticsearchController:
Expand Down
4 changes: 2 additions & 2 deletions morpheus/controllers/rss_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
try:
import feedparser
from bs4 import BeautifulSoup
except ImportError as exc:
IMPORT_EXCEPTION = exc
except ImportError as import_exc:
IMPORT_EXCEPTION = import_exc


@dataclass
Expand Down
4 changes: 2 additions & 2 deletions morpheus/llm/services/nemo_llm_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

try:
import nemollm
except ImportError as exc:
IMPORT_EXCEPTION = exc
except ImportError as import_exc:
IMPORT_EXCEPTION = import_exc


class NeMoLLMClient(LLMClient):
Expand Down
4 changes: 2 additions & 2 deletions morpheus/llm/services/openai_chat_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@

try:
import openai
except ImportError as exc:
IMPORT_EXCEPTION = exc
except ImportError as import_exc:
IMPORT_EXCEPTION = import_exc


class OpenAIChatClient(LLMClient):
Expand Down
4 changes: 2 additions & 2 deletions morpheus/service/vdb/milvus_vector_db_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
from pymilvus.orm.mutation import MutationResult

from morpheus.service.vdb.milvus_client import MilvusClient # pylint: disable=ungrouped-imports
except ImportError as exc:
IMPORT_EXCEPTION = exc
except ImportError as import_exc:
IMPORT_EXCEPTION = import_exc


class FieldSchemaEncoder(json.JSONEncoder):
Expand Down
4 changes: 2 additions & 2 deletions morpheus/stages/input/databricks_deltalake_source_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
from databricks.connect import DatabricksSession
from pyspark.sql import functions as sf
from pyspark.sql.window import Window
except ImportError as exc:
IMPORT_EXCEPTION = exc
except ImportError as import_exc:
IMPORT_EXCEPTION = import_exc


@register_stage("from-databricks-deltalake")
Expand Down
4 changes: 2 additions & 2 deletions morpheus/stages/output/write_to_databricks_deltalake_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
try:
from databricks.connect import DatabricksSession
from pyspark.sql import types as sql_types
except ImportError as exc:
IMPORT_EXCEPTION = exc
except ImportError as import_exc:
IMPORT_EXCEPTION = import_exc


@register_stage("to-databricks-deltalake")
Expand Down

0 comments on commit 6068dd8

Please sign in to comment.