Skip to content

Commit

Permalink
change to type checking (#5062)
Browse files Browse the repository at this point in the history
  • Loading branch information
hwchase17 committed May 21, 2023
1 parent 424a573 commit 8c661ba
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions langchain/utilities/powerbi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import logging
import os
from copy import deepcopy
from typing import Any, Dict, Iterable, List, Optional, Union
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Union

import aiohttp
import requests
Expand All @@ -16,13 +16,8 @@

BASE_URL = os.getenv("POWERBI_BASE_URL", "https://api.powerbi.com/v1.0/myorg")

try:
if TYPE_CHECKING:
from azure.core.credentials import TokenCredential
except ImportError:
_LOGGER.log(
logging.WARNING,
"Could not import azure.core python package.",
)


class PowerBIDataset(BaseModel):
Expand Down

0 comments on commit 8c661ba

Please sign in to comment.