Skip to content

Commit

Permalink
Add description for http_adapter and HttpAdapter as type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
alexis.flipo committed Dec 5, 2023
1 parent 76f6a72 commit ade8ecd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dbtmetabase/metabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import requests
import yaml
from requests.adapters import BaseAdapter, HTTPAdapter, Retry
from requests.adapters import HTTPAdapter, Retry

from .logger.logging import logger
from .models import exceptions
Expand Down Expand Up @@ -129,7 +129,7 @@ def __init__(
exclude_sources: bool = False,
http_extra_headers: Optional[dict] = None,
http_timeout: int = 15,
http_adapter: Optional[BaseAdapter] = None,
http_adapter: Optional[HTTPAdapter] = None,
):
"""Constructor.
Expand All @@ -147,7 +147,7 @@ def __init__(
sync_timeout (Optional[int], optional): Synchronization timeout (in secs). Defaults to None.
http_extra_headers {dict} -- HTTP headers to be used by the Metabase client. (default: {None})
exclude_sources {bool} -- Exclude exporting sources. (default: {False})
http_adapter: (Optional[BaseAdapter], optional) Provides a general-case interface for Requests sessions to contact HTTP and HTTPS urls by implementing the Transport Adapter interface. Defaults to None.
http_adapter: (Optional[HTTPAdapter], optional) Provide custom HTTP adapter implementation for requests to use. Defaults to None.
"""

self.base_url = f"{'http' if use_http else 'https'}://{host}"
Expand Down
6 changes: 3 additions & 3 deletions dbtmetabase/models/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
NoMetabaseCredentialsSupplied,
)
from .metabase import MetabaseModel
from requests.adapters import BaseAdapter
from requests.adapters import HTTPAdapter


class MetabaseInterface:
Expand All @@ -35,7 +35,7 @@ def __init__(
exclude_sources: bool = False,
http_extra_headers: Optional[dict] = None,
http_timeout: int = 15,
http_adapter: Optional[BaseAdapter] = None,
http_adapter: Optional[HTTPAdapter] = None,
):
"""Constructor.
Expand All @@ -52,7 +52,7 @@ def __init__(
sync_timeout (Optional[int], optional): Synchronization timeout (in secs). Defaults to None.
exclude_sources (bool, optional): Exclude exporting sources. Defaults to False.
http_extra_headers (Optional[dict], optional): HTTP headers to be used by the Metabase client. Defaults to None.
http_adapter: (Optional[BaseAdapter], optional) Provides a general-case interface for Requests sessions to contact HTTP and HTTPS urls by implementing the Transport Adapter interface. Defaults to None.
http_adapter: (Optional[HTTPAdapter], optional) Provide custom HTTP adapter implementation for requests to use. Defaults to None.
"""

# Metabase Client
Expand Down

0 comments on commit ade8ecd

Please sign in to comment.